[LLVMdev] JIT and garbage collection

Chris Lattner sabre at nondot.org
Sun Aug 6 12:04:31 PDT 2006


On Sun, 6 Aug 2006, Reid Spencer wrote:
> Yes, the JIT implementation was recently improved to add support for
> this. There's nothing you need to do (or emit). The JIT implementation
> will automatically collect memory that is not being used. See the
> JITMemoryManager in lib/ExecutionEngine/JIT/JITEmitter.cpp for details.

The JIT doesn't automatically do this.  I don't track where function 
pointers are and autoreclaim.  The client must specifically request that 
specific functions code be deallocated.

-Chris

> On Sun, 2006-08-06 at 14:30 -0400, Hendrik Boom wrote:
>> If I recall correctly, the garbage collector interface consists mostly of
>> some fuctions that one calls during execution to notify the collector
>> about a GC root. There's one othr thing that's needed if you do JIT
>> compilation: you have to garbage-collect the generated code.  This means
>> that the collector must be able to find where the pointers are in the
>> generated code together with metadata.
>>
>> Is there any support for this?
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list