You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Matt Massie (JIRA)" <ji...@apache.org> on 2010/01/22 19:18:21 UTC

[jira] Created: (AVRO-367) Complete memory management for the C implementation

Complete memory management for the C implementation
---------------------------------------------------

                 Key: AVRO-367
                 URL: https://issues.apache.org/jira/browse/AVRO-367
             Project: Avro
          Issue Type: Improvement
          Components: c
            Reporter: Matt Massie
             Fix For: 1.3.0


This patch completes memory management for the C implementation.

* All schema and datum objects are now freed when dereferenced
* Four new methods have been added {{avro_wrapstring}}, {{avro_wrapbytes}}, {{avro_givestring}}, and {{avro_givebytes}}.  These new methods allow C developers to explicitly state if they want {{libavro}} to copy bytes/string (the default), "wrap" them with no memory management or "give" them to {{libavro}} to manage.  This allows for less buffer copying when decoding data.
* Issues with type punning have been resolved to prevent compiler warnings
* The {{map}} and {{record}} data structures now implement management correctly.
* A new valgrind test is added and runs during {{make check}} if valgrind is found on the build system.

A future optimization will be to have a stack of allocated objects for each obj type instead of always using malloc() and free().  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-367) Complete memory management for the C implementation

Posted by "Matt Massie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Massie updated AVRO-367:
-----------------------------

    Status: Patch Available  (was: Open)

> Complete memory management for the C implementation
> ---------------------------------------------------
>
>                 Key: AVRO-367
>                 URL: https://issues.apache.org/jira/browse/AVRO-367
>             Project: Avro
>          Issue Type: Improvement
>          Components: c
>            Reporter: Matt Massie
>            Assignee: Matt Massie
>             Fix For: 1.3.0
>
>         Attachments: AVRO-367.patch
>
>
> This patch completes memory management for the C implementation.
> * All schema and datum objects are now freed when dereferenced
> * Four new methods have been added {{avro_wrapstring}}, {{avro_wrapbytes}}, {{avro_givestring}}, and {{avro_givebytes}}.  These new methods allow C developers to explicitly state if they want {{libavro}} to copy bytes/string (the default), "wrap" them with no memory management or "give" them to {{libavro}} to manage.  This allows for less buffer copying when decoding data.
> * Issues with type punning have been resolved to prevent compiler warnings
> * The {{map}} and {{record}} data structures now implement management correctly.
> * A new valgrind test is added and runs during {{make check}} if valgrind is found on the build system.
> A future optimization will be to have a stack of allocated objects for each obj type instead of always using malloc() and free().  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AVRO-367) Complete memory management for the C implementation

Posted by "Matt Massie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Massie reassigned AVRO-367:
--------------------------------

    Assignee: Matt Massie

> Complete memory management for the C implementation
> ---------------------------------------------------
>
>                 Key: AVRO-367
>                 URL: https://issues.apache.org/jira/browse/AVRO-367
>             Project: Avro
>          Issue Type: Improvement
>          Components: c
>            Reporter: Matt Massie
>            Assignee: Matt Massie
>             Fix For: 1.3.0
>
>
> This patch completes memory management for the C implementation.
> * All schema and datum objects are now freed when dereferenced
> * Four new methods have been added {{avro_wrapstring}}, {{avro_wrapbytes}}, {{avro_givestring}}, and {{avro_givebytes}}.  These new methods allow C developers to explicitly state if they want {{libavro}} to copy bytes/string (the default), "wrap" them with no memory management or "give" them to {{libavro}} to manage.  This allows for less buffer copying when decoding data.
> * Issues with type punning have been resolved to prevent compiler warnings
> * The {{map}} and {{record}} data structures now implement management correctly.
> * A new valgrind test is added and runs during {{make check}} if valgrind is found on the build system.
> A future optimization will be to have a stack of allocated objects for each obj type instead of always using malloc() and free().  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-367) Complete memory management for the C implementation

Posted by "Matt Massie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Massie updated AVRO-367:
-----------------------------

    Attachment: AVRO-367.patch

> Complete memory management for the C implementation
> ---------------------------------------------------
>
>                 Key: AVRO-367
>                 URL: https://issues.apache.org/jira/browse/AVRO-367
>             Project: Avro
>          Issue Type: Improvement
>          Components: c
>            Reporter: Matt Massie
>            Assignee: Matt Massie
>             Fix For: 1.3.0
>
>         Attachments: AVRO-367.patch
>
>
> This patch completes memory management for the C implementation.
> * All schema and datum objects are now freed when dereferenced
> * Four new methods have been added {{avro_wrapstring}}, {{avro_wrapbytes}}, {{avro_givestring}}, and {{avro_givebytes}}.  These new methods allow C developers to explicitly state if they want {{libavro}} to copy bytes/string (the default), "wrap" them with no memory management or "give" them to {{libavro}} to manage.  This allows for less buffer copying when decoding data.
> * Issues with type punning have been resolved to prevent compiler warnings
> * The {{map}} and {{record}} data structures now implement management correctly.
> * A new valgrind test is added and runs during {{make check}} if valgrind is found on the build system.
> A future optimization will be to have a stack of allocated objects for each obj type instead of always using malloc() and free().  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-367) Complete memory management for the C implementation

Posted by "Matt Massie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Massie updated AVRO-367:
-----------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Committed to trunk

> Complete memory management for the C implementation
> ---------------------------------------------------
>
>                 Key: AVRO-367
>                 URL: https://issues.apache.org/jira/browse/AVRO-367
>             Project: Avro
>          Issue Type: Improvement
>          Components: c
>            Reporter: Matt Massie
>            Assignee: Matt Massie
>             Fix For: 1.3.0
>
>         Attachments: AVRO-367.patch
>
>
> This patch completes memory management for the C implementation.
> * All schema and datum objects are now freed when dereferenced
> * Four new methods have been added {{avro_wrapstring}}, {{avro_wrapbytes}}, {{avro_givestring}}, and {{avro_givebytes}}.  These new methods allow C developers to explicitly state if they want {{libavro}} to copy bytes/string (the default), "wrap" them with no memory management or "give" them to {{libavro}} to manage.  This allows for less buffer copying when decoding data.
> * Issues with type punning have been resolved to prevent compiler warnings
> * The {{map}} and {{record}} data structures now implement management correctly.
> * A new valgrind test is added and runs during {{make check}} if valgrind is found on the build system.
> A future optimization will be to have a stack of allocated objects for each obj type instead of always using malloc() and free().  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.