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

Jauhien Piatlicki via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 11:45:20 PDT 2015


jauhien added a comment.

Hi Lang,

thank you for in-depth answer. Now I clearly see what are your reasons.

In http://reviews.llvm.org/D12607#242715, @lhames wrote:

> Hi Jauhien,




> If all you're looking for is a bare-bones default memory manager implementation I think this patch could serve as a base for that, but I have to stress: This would *not* be a matter of exposing access to SectionMemoryManager through the C API, even if that's how it happened to be implemented today. Tomorrow we might replace SectionMemoryManager with something that still met the restricted contact, but behaved totally different to SectionMemoryManager.

> 

> So - the question is whether you're just looking for a default memory manager, or for SectionMemoryManager in particular. The former is doable, the latter is not.


What I'm looking for is (starting from the most important):

1. possibility to have MM with custom symbol resolution
2. have default MM that is ok for simplest uses

If we could use this patch as a base for solving both problems, it would be really great. What should I change to have this patch accepted as implementation of a bare-bones default MM? The most obvious thing that I see is renaming (so no section MM is mentioned) and warning for users in comments about only base guaranties.

What I would like to have as result is:

1. Possibility to implement completely custom MM with custom symbol resolution
2. Possibility to define not all callbacks, for undefined callbacks some base implementation is used. No guaranties apart from those most basic.
3. Possibility to call custom implementation from user implemented callbacks (specially usefull for symbol resolution).


http://reviews.llvm.org/D12607





More information about the llvm-commits mailing list