On 11/19/2015 03:55 PM, Philipp Stephani wrote:
> Modules cannot (legally) call xmalloc. They need to obtain memory
> using malloc or any other standard function. In general, modules
> cannot call any functions except those declared in emacs-module.h.
I'm suggesting that we declare a memory allocator in emacs-module.h.
Sorry if that wasn't clear.
We can do that, but I don't expect modules to use it. Modules will typically be used to wrap existing C or C++ libraries or make heavy use of such libraries, and those libraries won't use an Emacs-specific allocator.
What could go wrong if modules use malloc for memory allocation?