summaryrefslogtreecommitdiff
path: root/src/stdlib/free.c
blob: 55a98a2f1f90a6ee2689c6346c42394cc88cbbeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdlib.h>

/** deallocate memory **/

void free(void * ptr)
{
	if (ptr == NULL) {
		return;
	}

	realloc(ptr, 0);
}

/***
deallocates the memory at ARGUMENT(ptr). Specifying CONSTANT(NULL)
causes nothing to happen.
***/

/*
UNDEFINED(ARGUMENT(ptr) was not returned by a previous call to FUNCTION(calloc), FUNCTION(malloc), or FUNCTION(realloc))
STDC(1)
*/