GNU bug report logs - #27416
[PROPOSED] Simplify malloc replacement on glibc

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Sun, 18 Jun 2017 00:54:02 UTC

Severity: wishlist

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #10 received at control <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 27416 <at> debbugs.gnu.org
Subject: Re: bug#27416: [PROPOSED] Simplify malloc replacement on glibc
Date: Sun, 18 Jun 2017 10:07:53 -0400
tags 27416 + patch
severity 27416 wishlist
quit

Paul Eggert <eggert <at> 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.





This bug report was last modified 8 years and 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.