Paul Eggert schrieb am Fr., 20. Nov. 2015 um 22:04 Uhr: > Philipp Stephani wrote: > > 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. > > It's quite likely that wrappers will need to allocate memory to marshal > data > back and forth between C and Elisp. If I wanted to build a module to use > GMP, > for example, I'd want to use GMP's low-level primitives that don't do > memory > management, and have the wrapper manage memory itself. > > I suppose some wrappers won't need to manage memory at all, but I'd say > most > libraries need memory, and the overall system will benefit from having a > single > memory manager rather than having each library manage its own memory > independently. > That sounds reasonable, and since there is no other way for modules to use Emacs's allocator it would make sense to add it to the module interface (the env object), as long as modules remain free to pick any allocator. > > Have you used the Emacs memory profiler? > I think once, but not regularly. Still sounds like a useful thing to have.