12 #define EXIT_SUCCESS 0
13 #define EXIT_FAILURE 1
24 void *
malloc(
unsigned int size);
30 void *
calloc(
size_t num,
size_t size);
40 void *
realloc(
void *ptr,
size_t size);
54 int setenv(
const char *name,
const char *value,
int overwrite);
64 char *
getenv(
const char *name);
69 #define RAND_MAX ((1U << 31U) - 1U)
73 void srand(
unsigned x);
93 unsigned randuint(
unsigned lb,
unsigned ub);
float randf(void)
Generates a random floating point number between 0 and 1.
Definition: stdlib.c:123
int unsetenv(const char *name)
Tries to remove the variable from the environment.
Definition: setenv.c:118
int randint(int lb, int ub)
Generates a random integer between lb and ub.
Definition: stdlib.c:128
void * realloc(void *ptr, size_t size)
Reallocates the given area of memory.
Definition: stdlib.c:71
int setenv(const char *name, const char *value, int overwrite)
Tries to adds the variable to the environment.
Definition: setenv.c:57
void srand(unsigned x)
Allows to set the seed of the random value generator.
Definition: stdlib.c:113
float randfloat(float lb, float ub)
Generates a random float between lb and ub.
Definition: stdlib.c:138
void * calloc(size_t num, size_t size)
Allocates a block of memory for an array of num elements.
Definition: stdlib.c:62
void abort(void)
Cause an abnormal program termination with core-dump.
Definition: abort.c:15
size_t malloc_usable_size(void *ptr)
Returns the number of usable bytes in the block pointed to by ptr.
unsigned rand(void)
Generates a random unsigned integer between 0 and RAND_MAX.
Definition: stdlib.c:118
char * getenv(const char *name)
Returns the value of the given variable.
Definition: setenv.c:147
void * malloc(unsigned int size)
Provides dynamically allocated memory.
Definition: stdlib.c:42
unsigned randuint(unsigned lb, unsigned ub)
Generates a random unsigned between lb and ub.
Definition: stdlib.c:133
void free(void *ptr)
Frees dynamically allocated memory.
Definition: stdlib.c:98