blob: 733d73b38bcb5b4e9a90f4358c749479e946f772 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include <stdlib.h>
#include "_stdlib.h"
/** allocate memory **/
void * malloc(size_t size)
{
SIGNAL_SAFE(0);
if (size == 0) {
return NULL;
}
return realloc(NULL, size);
}
/***
allocates ARGUMENT(size) bytes of memory.
***/
/*
UNSPECIFIED(The order and contiguity of space allocated by success calls)
IMPLEMENTATION(What is returned if ARGUMENT(size) is 0)
RETURN_FAILURE(CONSTANT(NULL))
RETURN_SUCCESS(a pointer to the allocated space)
STDC(1)
*/
|