Changeset 1747b0c in rtems-libbsd


Ignore:
Timestamp:
Apr 4, 2012, 7:33:16 PM (7 years ago)
Author:
Jennifer Averett <jennifer.averett@…>
Branches:
4.11, fd86c091b97759106da7355ce1dd81ebe030e285, freebsd-9.3, f020f08430150c1656a0ad0a1de13699db9b980b
Children:
5d21d7a
Parents:
6618e3e
Message:

Added _bsd_realloc method.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/src/rtems-bsd-malloc.c

    r6618e3e r1747b0c  
    6464}
    6565
     66#undef realloc
     67void *
     68_bsd_realloc( void *addr, unsigned long size,
     69  struct malloc_type *type, int flags)
     70{
     71        void *p = realloc(addr, size);
     72
     73        if ((flags & M_ZERO) != 0 && p != NULL) {
     74                memset(p, 0, size);
     75        }
     76
     77        return p;
     78}
     79
    6680#undef free
    6781
Note: See TracChangeset for help on using the changeset viewer.