Re: [rice] memmory leaks
- Paul Brannan
- 2012-10-02 @ 13:35
Try running under valgrind to see if the leak is in Rice, in the C++ code,
or in Ruby. You can use this suppressions file:
to weed out any of the "normal" memory errors.
If the leak is in Ruby objects, you can use a ruby memory profiler instead
of a C/C++ memory profiler to further narrow down the cause.
On Tue, Oct 2, 2012 at 9:19 AM, Noel <email@example.com> wrote:
> Hi guys.
> I have a memory leak. I have a sinatra web-service up and running
> that requires my rice wrapped c++ library. With each http request, the
> memory usage of the application shoots up by a minimum of 60 Mb.
> I am yet to discover where the leak is coming from exactly but out of
> general intuition, here is my suspect list...
> 1) The c/c++ code I have written to wrap the libraries
> 2) Rice itself (Or the fact I'm using ruby 1.9.3 with it)
> 3) Sinatra
> 4) CGAL
> 5) Ruby
> So, any initial words of wisdom before I embark on this journey of
> discovery? For example, what happens to constants in my rice code? Do
> they get garbage collected?