[LLVMdev] Memory allocation (or deallocation) model?
Benjamin Smedberg
benjamin at smedbergs.us
Mon Dec 3 16:50:39 PST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've been reading the headers and
http://llvm.org/releases/2.1/docs/ProgrammersManual.html and I'm still
confused about a pretty fundamental point... who is expected to clean up
various objects when we're finished with them, and when?
Let's say I've created a module, retrieved a bunch of types, created a
function, a basic block, and instructions and inserted them all together.
I've linked it all to an execution engine, and gotten a function pointer to
actually call using getPointerToFunctionOrStub:
* Does the function pointer stay good as long as the execution engine is alive?
* Once the function is JITted, will all those types/instructions/functions
still be allocated in memory?
** If so, is there a way to explicitly free them?
* Can I "delete executionEngine" to free up all the memory?
- --BDS
- --
Benjamin Smedberg
Platform Guru
Mozilla Corporation
benjamin at smedbergs.us
http://benjamin.smedbergs.us/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHVKRfSSwGp5sTYNkRAg5KAKCkaYvIqD9ERW8d6HXVNUoSY3jcUwCfcLYX
TSO793MS0OzgxSEOKURY1/M=
=pjhx
-----END PGP SIGNATURE-----
More information about the llvm-dev
mailing list