git: libstand - Fix excessive memory use by hammer2 module

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Apr 2 14:42:09 PDT 2014


commit f5ad3ecb7f214a88dec9c9567bc9c934e24b64e0
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Apr 2 14:38:54 2014 -0700

    libstand - Fix excessive memory use by hammer2 module
    
    * Don't try to dynamically allocate 64KB for each open file.  Just use
      the same static media buffer that normal operations use.
    
      This fixes some severe heap fragmentation and out-of-memory issues
      when a lot (20+) modules are specified in /boot/loader.conf that
      can cause the boot loader to fail.
    
    * Add getheap() to retrieve heap stats.

Summary of changes:
 lib/libstand/hammer2.c | 27 +++++++++++++++------------
 lib/libstand/sbrk.c    |  7 +++++++
 lib/libstand/stand.h   |  1 +
 3 files changed, 23 insertions(+), 12 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f5ad3ecb7f214a88dec9c9567bc9c934e24b64e0


-- 
DragonFly BSD source repository



More information about the Commits mailing list