cvs commit: src/lib/libc/stdlib malloc.c

Jason Evans jasone at FreeBSD.org
Fri Mar 24 00:28:09 UTC 2006


jasone      2006-03-24 00:28:08 UTC

  FreeBSD src repository

  Modified files:
    lib/libc/stdlib      malloc.c 
  Log:
  Add USE_BRK-specific code in malloc_init_hard() to allow the first
  internally used chunk to start at the beginning of the heap, rather
  than at a chunk-aligned address.  This reduces mapped memory somewhat
  for 32-bit architectures.
  
  Add the arena_run_link_t type and use it wherever a run object is only
  used as a ring 'header'.  This saves approximately 40 kB of memory per
  arena.
  
  Remove an obsolete (no longer used) code path from base_alloc(), which
  supported the internal allocation of objects larger than the chunk
  size.
  
  Enhance chunk_dealloc() to cache chunk addresses for all deallocated
  chunks.  This has no impact for most programs, but has the potential
  to reduce VM map fragmentation for programs that use huge
  allocations.
  
  Revision  Changes    Path
  1.115     +110 -65   src/lib/libc/stdlib/malloc.c


More information about the cvs-src mailing list