2016-11-05 22:00:23 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
|
|
|
|
|
|
|
#ifndef GINT_NO_SYSCALLS
|
2017-07-05 21:38:12 +02:00
|
|
|
#include <internals/syscalls.h>
|
2016-11-05 22:00:23 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
free()
|
|
|
|
Frees a memory block allocated by malloc(), calloc() or realloc().
|
|
|
|
*/
|
|
|
|
void free(void *ptr)
|
|
|
|
{
|
2017-07-05 21:38:12 +02:00
|
|
|
// Just to be sure.
|
|
|
|
if(!ptr) return;
|
|
|
|
|
2016-11-05 22:00:23 +01:00
|
|
|
#ifndef GINT_NO_SYSCALLS
|
|
|
|
__free(ptr);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
#pragma GCC diagnostic pop
|