[ 
https://issues.apache.org/jira/browse/THRIFT-3552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15111264#comment-15111264
 ] 

Simon South commented on THRIFT-3552:
-------------------------------------

The [Concepts page|http://thrift.apache.org/docs/concepts] on the website gives 
a high-level overview of Thrift's architecture, and everything there applies to 
the C (GLib) implementation. [The 
tutorials|http://thrift.apache.org/tutorial/c_glib], if you haven't read 
through them yet, also explain a little bit about how everything fits together.

The C implementation intentionally mirrors the C++ one, so much of what can be 
said about the latter applies to the former as well (with accommodations for 
GObject, such as its lack of template support). There is not a tremendous 
amount of documentation on Thrift yet, though, so reading through the code may 
still be your best bet.

By the way, [the developer mailing list|http://thrift.apache.org/mailing] is a 
better place to ask this sort of question.

> glib_c Memory Leak
> ------------------
>
>                 Key: THRIFT-3552
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3552
>             Project: Thrift
>          Issue Type: Bug
>          Components: C glib - Library
>    Affects Versions: 0.9.3
>            Reporter: Anish Shah
>            Assignee: Simon South
>            Priority: Critical
>             Fix For: 0.9.4, 1.0
>
>         Attachments: 0001-c_glib-Fix-memory-leak-in-processor.patch
>
>
> I have been seeing some memory leaks using valgring in my testprogram.
> Leak:
> ==94320== 17,878 bytes in 2,712 blocks are definitely lost in loss record 987 
> of 1,018
> ==94320==    at 0x4A057BB: calloc (vg_replace_malloc.c:593)
> ==94320==    by 0x3D7DA49BF7: g_malloc0 (gmem.c:196)
> ==94320==    by 0x5768002: thrift_binary_protocol_read_string 
> (thrift_binary_protocol.c:791)
> ==94320==    by 0x5768987: thrift_binary_protocol_read_message_begin 
> (thrift_binary_protocol.c:431)
> ==94320==    by 0x576702E: thrift_dispatch_processor_process 
> (thrift_dispatch_processor.c:41)
> ==94320==    by 0x576CC06: thrift_simple_server_serve 
> (thrift_simple_server.c:62)
> ==94320==    by 0x45A548: server_start (server.c:135)
> ==94320==    by 0x3D7C607A50: start_thread (pthread_create.c:301)
> ==94320==    by 0x3D7C2E893C: clone (clone.S:115)
> My question is where is the *str memory allocated by function 
> thrift_binary_protocol_read_string() freed? Am I doing something wrong or is 
> there an actual memory leak? 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to