On 05/25/2013 09:47 PM, Daniel Borkmann wrote:
trinity currently quite often does not care about freeing memory on its own that was fetched through malloc(). Therefore it can happen if trinity runs for quite a long time, that oom-killer gets invoked. So for now use the Boehm-Demers-Weiser's garbage collecting memory allocator as a malloc replacement to avoid such situations. In this patch, we wrap all BDW functions into bdw_* equivalents, so that we could later on still #ifdef something if we want to and replace all calls based on the build. Calling bdw_free() is still legimite, but the memory is reclaimed via bdw_gcollect(), which would solve trinity's memory management. Dependency that we need when building (in case people don't want additional libs, follow-up patches could still #ifdef bdw_* wrappers to the glibc functions): Fedora: yum install gc-devel Debian: apt-get install libgc-dev More information on Boehm-Demers-Weiser allocator can be found here: http://www.hpl.hp.com/personal/Hans_Boehm/gc/ Signed-off-by: Daniel Borkmann <dborkman@xxxxxxxxxx>
Please ignore this for now, will send a further improved v2 soon. -- To unsubscribe from this list: send the line "unsubscribe trinity" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html