emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic loading progress


From: Philipp Stephani
Subject: Re: Dynamic loading progress
Date: Fri, 20 Nov 2015 22:44:51 +0000



Paul Eggert <address@hidden> 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.
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]