22 static void *memalloc(
void *
heap,
size_t request)
28 memset(rv, 0, request);
32 static void *memresize(
void *
heap,
void *ptr,
size_t oldsize,
38 rv = realloc(ptr, request);
39 if (request > oldsize)
40 memset((
char *) rv + oldsize, 0, request - oldsize);
44 static void memfree(
void *heap,
void *ptr)
60 { memopen, memalloc, memresize, memfree,
memclose };
67 if (mem ==
NIL(
void *))
81 AGDISC(g, mem)->resize(
AGCLOS(g, mem), ptr, oldsize, size);
82 if (mem ==
NIL(
void *))
CGRAPH_API Agmemdisc_t AgMemDisc
int agerr(agerrlevel_t level, const char *fmt,...)
CGRAPH_API void agfree(Agraph_t *g, void *ptr)
CGRAPH_API void * agrealloc(Agraph_t *g, void *ptr, size_t oldsize, size_t size)
CGRAPH_API struct _vmalloc_s * agheap(Agraph_t *g)
CGRAPH_API void * agalloc(Agraph_t *g, size_t size)