DragonFly commits List (threaded) for 2009-04
DragonFly BSD
DragonFly commits List (threaded) for 2009-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

DragonFly-2.3.0.826.g11e45 master include stdlib.h lib/libc/stdlib nmalloc.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Apr 2009 09:34:50 -0700 (PDT)

commit 11e45f670654c8b84541cb74fbde240db9359143
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Tue Apr 28 09:30:10 2009 -0700

    Add posix_memalign(), fix minor bug in nmalloc.
    
    Add the posix_memalign() function in all of its glory.  Our new slab
    allocator already does most of the job perfectly, particularly when
    alignment < size (for things like cache-line aligned allocations).
    
    Correct a bug in _vmem_alloc() for the case where (size) is much larger
    then (alignment).  The hack to get mmap() to return an aligned address
    was not properly unmapping temporarily-mapped space.
    
    Reformulate how errno is set to support posix_memalign(), which is defined
    by the standard to return the error rather then set errno.
    
    Requested-by: Hasso Tepper <hasso@estpak.ee>

Summary of changes:
 include/stdlib.h          |    1 +
 lib/libc/stdlib/nmalloc.c |  119 ++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 112 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/11e45f670654c8b84541cb74fbde240db9359143


-- 
DragonFly BSD source repository



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