summaryrefslogtreecommitdiff
path: root/myalloc.h
blob: 42a625967a0c999dba90d7522f88285b4ade0e4e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
 * @brief Allocates memory for the user to use for data storage.
 *
 * @param size The size of the memory space requested, in bytes.
 * @returns A pointer to memory, at least the size of that requested,
 * that the user can write to, or `NULL` if such memory cannot be
 * allocated.
 */
void* myalloc(int size);

/**
 * @brief Frees a chunk of memory, allowing other processes to use it.
 *
 * @param ptr A pointer to the start of the memory that should be freed.
 */
void myfree(void* ptr);