emacs-devel
[Top][All Lists]
Advanced

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

Re: PURESIZE increased (again)


From: Luc Teirlinck
Subject: Re: PURESIZE increased (again)
Date: Thu, 27 Apr 2006 17:53:40 -0500 (CDT)

I may be wrong.  I got the impression that differences in, for
instance, the C library and even the actual version of, say glibc, did
matter, from, for instance, the following comment from alloc.c, which
seems to say that different versions of glibc waste different amounts
of memory on alignment.  But maybe I misunderstood the comment.

  /* Padding to leave at the end of a malloc'd block.  This is to give
     malloc a chance to minimize the amount of memory wasted to alignment.
     It should be tuned to the particular malloc library used.
     On glibc-2.3.2, malloc never tries to align, so a padding of 0 is best.
     posix_memalign on the other hand would ideally prefer a value of 4
     because otherwise, there's 1020 bytes wasted between each ablocks.
     In Emacs, testing shows that those 1020 can most of the time be
     efficiently used by malloc to place other objects, so a value of 0 can
     still preferable unless you have a lot of aligned blocks and virtually
     nothing else.  */
  #define BLOCK_PADDING 0






reply via email to

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