unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* simplify GNU Emacs builds by replacing malloc
@ 2017-06-18  3:16 Paul Eggert
  2017-06-22  6:29 ` John Wiegley
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggert @ 2017-06-18  3:16 UTC (permalink / raw)
  To: Emacs Development

In Bug#27416 I propose replacing Emacs's hybrid malloc implementation on GNUish 
platforms with a hybrid implementation that redefines malloc instead of 
re-#defining it. That is, instead of defining a function hybrid_malloc that can 
call either gmalloc or the system malloc (and using the macro "#define malloc 
hybrid_malloc" in Emacs code), Emacs defines a function malloc that can call 
either gmalloc or the system malloc (via the latter’s alternate name 
‘__libc_malloc’), without using a macro.

Under this proposal, the Emacs build process no longer needs to compile library 
files twice. For example, it can simply build lib/gettime.o from lib/gettime.c, 
rather than having to build both lib/gettime.o and lib/e-gettime.o. This is 
because there is only one malloc symbol used by Emacs code, not two.

The hybrid malloc approach would not change on non-GNUish platforms.

Although this change seems like an obvious win in that it should make Emacs a 
bit easier to build and debug, I’m mentioning it on emacs-devel first in case 
anyone sees a problem with it.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27416



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-22 18:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-18  3:16 simplify GNU Emacs builds by replacing malloc Paul Eggert
2017-06-22  6:29 ` John Wiegley
2017-06-22 18:45   ` Paul Eggert
2017-06-22 18:48     ` John Wiegley

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).