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: Thu, 19 Nov 2015 23:55:57 +0000



Paul Eggert <address@hidden> schrieb am Fr., 20. Nov. 2015 um 00:50 Uhr:
On 11/19/2015 03:08 PM, Philipp Stephani wrote:
> Returning NULL is fine. malloc also returns NULL on OOM, and module.c
> handles that.

I'm not so much worried about emacs-module.c. I'm worried about what
modules will do. If we tell programmers 'just call xmalloc' things will
be easy for them. If not, they'll be more likely to make mistakes.

Is there some way xmalloc (actually, memory_full) can detect that it was
invoked from a module rather than from ordinary Emacs code? If so, we
could have memory_full do something different than call xsignal, in that
case.

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.

reply via email to

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