gint_strcat/src/stdlib/malloc.c

28 lines
380 B
C

#include <stdlib.h>
/*
malloc()
Allocates 'size' bytes and returns a pointer to a free memory area.
Returns NULL on error.
*/
#ifndef GINT_NO_SYSCALLS
void *__malloc(size_t size);
void *malloc(size_t size)
{
return __malloc(size);
}
#else
#pragma GCC diagnostic ignored "-Wunused-parameter"
void *malloc(size_t size)
{
return NULL;
}
#pragma GCC diagnostic pop
#endif