summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c
index cee09ac..7e4ccb4 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -17,7 +17,7 @@ static aligned realspace[SPACE / ALIGNMENT];
#define space ((char *)realspace)
static unsigned int avail = SPACE; /* multiple of ALIGNMENT; 0<=avail<=SPACE */
-/*@null@*/ /*@out@*/ char *alloc(unsigned int n)
+void *alloc(unsigned int n)
{
char *x;
@@ -38,15 +38,16 @@ static unsigned int avail = SPACE; /* multiple of ALIGNMENT; 0<=avail<=SPACE */
return x;
}
-void alloc_free(char *x)
+void alloc_free(void *x)
{
if (x >= space)
if (x < space + SPACE) return; /* XXX: assuming that pointers are flat */
free(x);
}
-int alloc_re(char **x, unsigned int m, unsigned int n)
+int alloc_re(void *a, unsigned int m, unsigned int n)
{
+ char **x = a;
char *y;
y = alloc(n);