Changeset 15b8e495 in mainline


Ignore:
Timestamp:
2009-10-30T11:12:46Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c7dc8ad
Parents:
ce9d803
Message:

add calloc()

Location:
uspace/lib/libc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/malloc.c

    rce9d803 r15b8e495  
    353353}
    354354
     355void *calloc(const size_t nmemb, const size_t size)
     356{
     357        return malloc(nmemb * size);
     358}
     359
    355360void *malloc(const size_t size)
    356361{
  • uspace/lib/libc/include/malloc.h

    rce9d803 r15b8e495  
    4242
    4343extern void *malloc(const size_t size);
     44extern void *calloc(const size_t nmemb, const size_t size);
    4445extern void *memalign(const size_t align, const size_t size);
    4546extern void *realloc(const void *addr, const size_t size);
Note: See TracChangeset for help on using the changeset viewer.