If you link in tcmalloc to your app, it should just work w/o having to
change any code. See http://goog-perftools.sourceforge.net/doc/tcmalloc.html


On Thu, Aug 8, 2013 at 7:12 AM, <proto...@googlecode.com> wrote:

> Status: New
> Owner: liuj...@google.com
> Labels: Type-Defect Priority-Medium
>
> New issue 542 by leening0...@gmail.com: The memory leak problem
> http://code.google.com/p/**protobuf/issues/detail?id=542<http://code.google.com/p/protobuf/issues/detail?id=542>
>
> In the resume of protocol buffer, there are some descriptions like these:
> "Reuse message objects when possible. Messages try to keep around any
> memory they allocate for reuse, even when they are cleared. Thus, if you
> are handling many messages with the same type and similar structure in
> succession, it is a good idea to reuse the same message object each time to
> take load off the memory allocator. However, objects can become bloated
> over time, especially if your messages vary in "shape" or if you
> occasionally construct a message that is much larger than usual. You should
> monitor the sizes of your message objects by calling the SpaceUsed method
> and delete them once they get too big. Your system's memory allocator may
> not be well-optimized for allocating lots of small objects from multiple
> threads. Try using Google's tcmalloc instead. "
> Therefore, I use the tcmalloc in my codes, instead of the new. However,
> when I call the virtual function in my class, it will cause a core. Can the
> tcmalloc replace the new? How can I avoid the core caused by virtual
> problem.
>
>
> --
> You received this message because this project is configured to send all
> issue notifications to this address.
> You may adjust your notification preferences at:
> https://code.google.com/**hosting/settings<https://code.google.com/hosting/settings>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 
> protobuf+unsubscribe@**googlegroups.com<protobuf%2bunsubscr...@googlegroups.com>
> .
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at 
> http://groups.google.com/**group/protobuf<http://groups.google.com/group/protobuf>
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to