#include <mem.h>
Include dependency graph for stdlib.h:
Go to the source code of this file.
Functions | |
void * | calloc (size_t nmemb, size_t size) |
allocate and return pointer to initialized memory | |
void * | malloc (size_t size) |
allocate and return pointer to uninitialized memory | |
void | free (void *ptr) |
return the allocated memory to memory management. | |
long int | random (void) |
generate a random number | |
void | srandom (unsigned int seed) |
seed the random number generator |
This file describes the public programming interface for memory management services and random number services
Definition in file stdlib.h.
|
allocate and return pointer to initialized memory calloc() allocates memory for an array of {nmemb} elements of {size} bytes each and returns a pointer to the allocated memory. The memory is filled with zero values.
|
|
return the allocated memory to memory management. free() frees the memory space pointed to by {ptr}, which must have been returned by a previous call to malloc(), or calloc(). Other- wise, or if free(ptr) has already been called before, undefined behaviour occurs. If ptr is NULL, no operation is performed.
|
|
allocate and return pointer to uninitialized memory malloc() allocates {size} bytes of memory and returns a pointer to it.
|
|
generate a random number The random() function returns successive pseudo-random numbers
|
|
seed the random number generator The srandom() function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by random(). These sequences are repeatable by calling srandom() with the same seed value. If no seed value is provided, the random() function is automatically seeded with a value of 1.
|
brickOS is released under the
Mozilla Public License.
Original code copyright 1998-2002 by the authors. |