bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#27416: [PROPOSED] Simplify malloc replacement on glibc


From: npostavs
Subject: bug#27416: [PROPOSED] Simplify malloc replacement on glibc
Date: Sun, 18 Jun 2017 10:07:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)

tags 27416 + patch
severity 27416 wishlist
quit

Paul Eggert <eggert@cs.ucla.edu> writes:

> This avoids the need to build lib/e-gettime.o etc. on glibc
> platforms, as plain lib/gettime.o will do.

Could you add something like the summary you posted in
http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00351.html to
the commit message, I found the explanation here a bit confusing until I
read that.

    [Replace] 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.

    [T]he 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.






reply via email to

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