git: rtld: Sync memory allocation with FreeBSD

John Marino marino at crater.dragonflybsd.org
Sun Mar 25 04:28:46 PDT 2012


commit 244c342a6ea267fc2448f87dc5703cceae62e47e
Author: John Marino <draco at marino.st>
Date:   Sun Mar 25 12:49:17 2012 +0200

    rtld: Sync memory allocation with FreeBSD
    
    Taken from:
    FreeBSD SVN 233306 (22 March 2012)
    FreeBSD SVN 233307 (22 March 2012)
    FreeBSD SVN 233357 (22 March 2012)
    
    Remove unused CalTech #ifdef fragments.
    
    Use xmalloc() instead of malloc() in the places where malloc() calls
    are assumed to not fail. Make the xcalloc() calling conventions follow
    the calloc(3) calling conventions and replace unchecked calls to calloc()
    with calls to xcalloc(). Remove redundand declarations from xmalloc.c,
    which are already present in rtld.h.
    
    Implement xstrdup() using strlen()/xmalloc()/memcpy() already presented
    in rtld, instead of pulling in libc strdup().

Summary of changes:
 libexec/rtld-elf/malloc.c  |   18 ------------------
 libexec/rtld-elf/rtld.c    |    4 ++--
 libexec/rtld-elf/rtld.h    |    4 ++--
 libexec/rtld-elf/xmalloc.c |   30 +++++++++++++++++-------------
 4 files changed, 21 insertions(+), 35 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/244c342a6ea267fc2448f87dc5703cceae62e47e


-- 
DragonFly BSD source repository





More information about the Commits mailing list