ack/lang/pc/libpc/new.c

18 lines
208 B
C
Raw Permalink Normal View History

#include <stdlib.h>
#include <em_abs.h>
2018-06-17 20:30:27 +00:00
#include "pc.h"
void _new(int n, void** ptr)
{
void* p = malloc(n);
if (!p)
_trp(EHEAP);
*ptr = p;
}
void _dis(int n, void** ptr)
{
free(*ptr);
*ptr = NULL;
}