You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stdlib.h 742B

1234567891011121314151617181920212223242526
  1. #ifndef STDLIB_H
  2. #define STDLIB_H
  3. extern unsigned long strtoul ( const char *p, char **endp, int base );
  4. extern void * realloc ( void *old_ptr, size_t new_size );
  5. extern void * malloc ( size_t size );
  6. extern void free ( void *ptr );
  7. /**
  8. * Allocate cleared memory
  9. *
  10. * @v nmemb Number of members
  11. * @v size Size of each member
  12. * @ret ptr Allocated memory
  13. *
  14. * Allocate memory as per malloc(), and zero it.
  15. *
  16. * Note that malloc() and calloc() are identical, in the interests of
  17. * reducing code size. Callers should not, however, rely on malloc()
  18. * clearing memory, since this behaviour may change in future.
  19. */
  20. static inline void * calloc ( size_t nmemb, size_t size ) {
  21. return malloc ( nmemb * size );
  22. }
  23. #endif /* STDLIB_H */