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

123456789101112131415161718192021222324252627282930
  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. extern long int random ( void );
  9. extern void * _calloc ( size_t len );
  10. /**
  11. * Allocate cleared memory
  12. *
  13. * @v nmemb Number of members
  14. * @v size Size of each member
  15. * @ret ptr Allocated memory
  16. *
  17. * Allocate memory as per malloc(), and zero it.
  18. *
  19. * This is implemented as a static inline, with the body of the
  20. * function in _calloc(), since in most cases @c nmemb will be 1 and
  21. * doing the multiply is just wasteful.
  22. */
  23. static inline void * calloc ( size_t nmemb, size_t size ) {
  24. return _calloc ( nmemb * size );
  25. }
  26. #endif /* STDLIB_H */