blob: 2c6731ea8171f81f4bd96bda662043a61c5272d5 [file] [log] [blame]
/*
* These are here mainly so that I can link against
* debugmalloc.c instead and not recompile the world.
*/
#include <u.h>
#define NOPLAN9DEFINES
#include <libc.h>
void*
p9malloc(ulong n)
{
void *v;
if(n == 0)
n++;
return malloc(n);
}
void
p9free(void *v)
{
if(v == nil)
return;
free(v);
}
void*
p9calloc(ulong a, ulong b)
{
if(a*b == 0)
a = b = 1;
return calloc(a*b, 1);
}
void*
p9realloc(void *v, ulong n)
{
return realloc(v, n);
}