Bugs: Browse | Submit New | Admin

[#19922] [patch] Rice leaking memory on every function invocation

Date:
2008-05-03 22:48
Priority:
3
Submitted By:
Martyn Garcia (martyn)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
[patch] Rice leaking memory on every function invocation

Detailed description
Every time a method inside of rice was called 8 bytes were leaked.  bulletrb is making roughly 1000 method calls at
least 30 times a second.  This became very significant, so included is a patch that fixes this issue.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-05-27 12:13
Sender: Paul Brannan

Attaching a patch that should alleviate the problem until the
full solution can be implemented (this solution still leaks for
method definitions, but ideally we'd avoid that leak as well).
Date: 2008-05-25 23:47
Sender: Paul Brannan

Good catch.  Unfortunately the patch causes all modules to share
the same exception handler, which isn't the desired behavior.
The handler itself is intentionally leaked to work around a flaw
in the Ruby API.  I have another branch which works around this
flaw in a different way, so it is no longer necessary to leak
the handler.  This bug should be addressed with the next release
of Rice.

Thanks for the patch!

Attached Files:

Name Description Download
patch_0503.diff the patch containing the memory fix... forgot to actually upload it! Download
module_memory_leak.patch patch to alleviate the memory leak for method invocations Download

Changes:

Field Old Value Date By
File Added3768: module_memory_leak.patch2008-05-27 12:13cout
File Added3677: patch_0503.diff2008-05-06 03:59martyn