[LLVMdev] Re ducing LLVM's memory usage

Nuno Lopes nunoplopes at sapo.pt
Thu Jan 1 11:35:50 PST 2009


>> Is there are simple way of cleaning the used memory without destroying
>> everything (unloading the ExecutionEngine, freeing the module, calling
>> llvm_shutdown) ? Ideally I would like something which brings everything 
>> to
>> the state just after I created the JIT engine for the first time.
>>
>
> I've tried to run the Fibonacci example with Valgrind after having added
> delete EE and llvm_shutdown in the main of fibonacci.cpp. Unfortunately, 
> it
> gives me a lot of definitely lost blocks.
> I also have similar problems with my own code: there is a lot of lost
> ConstantInts. From what I saw in the LLVM code, constants are put in a
> statically managed structure which is supposed to be cleaned at shutdown.

The leakage of Constant* is a known issue.
In attach I send a fairly complete suppression file for valgrind (use 
with --suppressions=valgrind.supp) that will suppress the known problems 
from the report.

Nuno 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: valgrind.supp
Type: application/octet-stream
Size: 1943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090101/006c5976/attachment.obj>


More information about the llvm-dev mailing list