9 extern unsigned int seed;
12 #define RAND_MAX INT32_MAX 15 #define EXIT_SUCCESS 0 18 #define EXIT_FAILURE -1 67 long int labs(
long int n);
75 long long int llabs(
long long int n);
102 lldiv_t lldiv(
long long int numer,
long long int denom);
110 int atoi(
const char *
string);
118 long int atol(
const char *
string);
126 long long int atoll(
const char *
string);
136 char *
itoa(
int input,
char *
buffer,
int base);
146 double strtod(
const char* str,
char** endptr);
154 void *
malloc(
size_t size);
172 void *
calloc(
size_t num,
size_t size);
181 void *
realloc(
void *ptr,
size_t size);
188 void free(
void *ptr);
202 void srand(
unsigned int new_seed);
212 void qsort(
void *base,
size_t num,
size_t size,
int (*compar)(
const void *,
const void*));
226 void*
bsearch(
const void* key,
const void* base,
size_t num,
size_t size,
int (*compar)(
const void*,
const void*));
239 void exit(
int status);
247 char*
getenv(
const char* name);
267 int __stdlib_partition(
void* base,
size_t num,
size_t size,
int (*compar)(
const void *,
const void*));
char * itoa(int input, char *buffer, int base)
Convert integer to string (non-standard function)
Definition: itoa.c:3
void __stdlib_swap(void *first, void *second, size_t size)
Swap two elements. Used by qsort().
Definition: qsort.c:3
long int rem
Represents the remainder.
Definition: stdlib.h:37
int abs(int n)
Absolute value.
Definition: abs.c:4
void free(void *ptr)
Deallocate memory block.
Definition: free.c:3
ldiv_t ldiv(long int numer, long int denom)
Integral division.
Definition: ldiv.c:4
void * calloc(size_t num, size_t size)
Allocate and zero-initialize array.
Definition: calloc.c:3
long int quot
Represents the quotient.
Definition: stdlib.h:35
long int labs(long int n)
Absolute value.
Definition: labs.c:4
void exit(int status)
Terminate calling process.
Definition: exit.c:3
int __stdlib_partition(void *base, size_t num, size_t size, int(*compar)(const void *, const void *))
Sort and return position of key. Used by qsort().
Definition: qsort.c:18
div_t div(int numer, int denom)
Integral division.
Definition: div.c:4
void qsort(void *base, size_t num, size_t size, int(*compar)(const void *, const void *))
Sorts an array.
Definition: qsort.c:63
void * realloc(void *ptr, size_t size)
Reallocate memory block.
Definition: realloc.c:3
unsigned int seed
Definition: stdlib.c:3
Structure to represent the result value of an integral division.
Definition: stdlib.h:42
double strtod(const char *str, char **endptr)
Convert string to double.
Definition: strtod.c:44
void * malloc_align(size_t size, uint32_t align)
Allocate memory block with the specified align.
Definition: malloc_align.c:3
char * getenv(const char *name)
Get environment string.
Definition: getenv.c:3
int rand()
Generate random number.
Definition: rand.c:5
Structure to represent the result value of an integral division.
Definition: stdlib.h:32
long long int atoll(const char *string)
Convert string to integer.
Definition: atoll.c:3
long int atol(const char *string)
Convert string to integer.
Definition: atol.c:3
void * malloc(size_t size)
Allocate memory block.
Definition: malloc.c:3
long long int quot
Represents the quotient.
Definition: stdlib.h:45
void * bsearch(const void *key, const void *base, size_t num, size_t size, int(*compar)(const void *, const void *))
Binary search in array.
Definition: bsearch.c:3
lldiv_t lldiv(long long int numer, long long int denom)
Integral division.
Definition: lldiv.c:4
Structure to represent the result value of an integral division.
Definition: stdlib.h:22
int quot
Represents the quotient.
Definition: stdlib.h:25
char buffer[500]
Definition: physical_memory_manager.c:5
long long int llabs(long long int n)
Absolute value.
Definition: llabs.c:4
void abort()
Abort current process.
Definition: abort.c:3
int rem
Represents the remainder.
Definition: stdlib.h:27
int atoi(const char *string)
Convert string to integer.
Definition: atoi.c:3
size_t uint32_t
Unsigned integral type.
Definition: string.h:8
void srand(unsigned int new_seed)
Initialize random number generator.
Definition: srand.c:5
long long int rem
Represents the remainder.
Definition: stdlib.h:47