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 785B

123456789101112131415161718192021222324252627
  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. extern int system ( const char *command );
  8. /**
  9. * Allocate cleared memory
  10. *
  11. * @v nmemb Number of members
  12. * @v size Size of each member
  13. * @ret ptr Allocated memory
  14. *
  15. * Allocate memory as per malloc(), and zero it.
  16. *
  17. * Note that malloc() and calloc() are identical, in the interests of
  18. * reducing code size. Callers should not, however, rely on malloc()
  19. * clearing memory, since this behaviour may change in future.
  20. */
  21. static inline void * calloc ( size_t nmemb, size_t size ) {
  22. return malloc ( nmemb * size );
  23. }
  24. #endif /* STDLIB_H */