[PATCH] D12607: [ExecutionEngine] Add to the C API possibility to create custom SectionMemoryManager

Jauhien Piatlicki via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 10:55:47 PDT 2015


jauhien added inline comments.

================
Comment at: include/llvm-c/ExecutionEngine.h:214
@@ +213,3 @@
+typedef LLVMBool (*LLVMBSMMFinalizeMemoryCallback)(
+  void *Opaque, LLVMMCJITMemoryManagerRef MM, char **ErrMsg);
+typedef void     (*LLVMBSMMDestroyCallback)(void *Opaque);
----------------
DiamondLovesYou wrote:
> What will `ErrMsg`'s lifetime be (or who owns it after the callback returns)? Also, how would use of `alloc_jemalloc` affect this (w.r.t. Rust)?
This is the same situation as in already existing LLVMMemoryManagerFinalizeMemoryCallback. C API binding code freez it. With alloc_jemalloc -- a good question, but something like this already exists in the C API, so it is not in the scope of this patch.


http://reviews.llvm.org/D12607





More information about the llvm-commits mailing list