Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2007 03:13:15 +0000 (UTC)
From:      Jason Evans <jasone@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/lib/libc/stdlib malloc.c
Message-ID:  <200711270313.lAR3DFCj077959@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
jasone      2007-11-27 03:13:15 UTC

  FreeBSD src repository

  Modified files:
    lib/libc/stdlib      malloc.c 
  Log:
  Implement lazy deallocation of small objects.  For each arena, maintain a
  vector of slots for lazily freed objects.  For each deallocation, before
  doing the hard work of locking the arena and deallocating, try several times
  to randomly insert the object into the vector using atomic operations.
  
  This approach is particularly effective at reducing contention for
  multi-threaded applications that use the producer-consumer model, wherein
  one producer thread allocates objects, then multiple consumer threads
  deallocate those objects.
  
  Revision  Changes    Path
  1.150     +218 -0    src/lib/libc/stdlib/malloc.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711270313.lAR3DFCj077959>