new region. This module has incestuous knowledge of the
internals of both mfree and mmalloc. */
-PTR
-mrealloc (md, ptr, size)
- PTR md;
- PTR ptr;
- size_t size;
+void*
+mrealloc (void *md, void *ptr, size_t size)
{
struct mdesc *mdp;
- PTR result;
+ void* result;
int type;
size_t block, blocks, oldlimit;
return (result);
}
+/* Useless prototype to make gcc happy */
+void *realloc (void *ptr, size_t size);
+
/* When using this package, provide a version of malloc/realloc/free built
on top of it, so that if we use the default sbrk() region we will not
collide with another malloc package trying to do the same thing, if
the application contains any "hidden" calls to malloc/realloc/free (such
as inside a system library). */
-PTR
-realloc (ptr, size)
- PTR ptr;
- size_t size;
+void *
+realloc (void *ptr, size_t size)
{
- PTR result;
+ void* result;
- result = mrealloc ((PTR) NULL, ptr, size);
+ result = mrealloc (NULL, ptr, size);
return (result);
}