<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div></div><div><br><div><div>On May 15, 2013, at 6:58 PM, Filip Pizlo <<a href="mailto:fpizlo@apple.com">fpizlo@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">This patch allows a C API client to supply their own memory manager.<br><br>My main motivation for this is:<span class="Apple-converted-space"> </span><a href="https://bugs.webkit.org/show_bug.cgi?id=113619">https://bugs.webkit.org/show_bug.cgi?id=113619</a>.  WebKit wants to use the C API, since it's more stable.  WebKit already has its own JIT memory management and cache management logic, and we need LLVM to allocate from WebKit's JIT memory pool.<br><br>To make this work without causing dependency issues, the dummy destructor for RTDyldMemoryManager is moved into libLLVMExecutionEngine, and it's also now in its own header.  This allows ExecutionEngineBindings to speak of RTDyldMemoryManager.<br><br>The memory manager API is exposed as callbacks in the LLVMMCJITMemoryManagerFunctions struct.  The user is allowed to leave most of the functions NULL, and reasonable defaults are provided.<br><br>This patch also adds a test of the memory manager API, by round-tripping through the C API callback back into the SectionMemoryManager.<br><br>-Filip<br><br><span><mcjmm-c.patch></span>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></div></blockquote></div><br></div></body></html>