From: Paul Eggert <eggert@cs.ucla.edu>
To: Emacs Development <Emacs-devel@gnu.org>
Subject: simplify GNU Emacs builds by replacing malloc
Date: Sat, 17 Jun 2017 20:16:47 -0700 [thread overview]
Message-ID: <ab11b250-2099-922b-ef1d-15b969bab61e@cs.ucla.edu> (raw)
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
next reply other threads:[~2017-06-18 3:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-18 3:16 Paul Eggert [this message]
2017-06-22 6:29 ` simplify GNU Emacs builds by replacing malloc John Wiegley
2017-06-22 18:45 ` Paul Eggert
2017-06-22 18:48 ` John Wiegley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab11b250-2099-922b-ef1d-15b969bab61e@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=Emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.