diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-09-28 21:20:40 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-09-28 21:33:03 +0200 |
commit | 8e7e029114c59341ec793dc9e96ee410a5f37e2b (patch) | |
tree | ac196b359c93716158dedd767f425d9e093c9b71 /src/alloc.c | |
parent | f9a8fff2f90626aadd915178d04ece49d8c4884a (diff) |
update to version 25meson
Diffstat (limited to 'src/alloc.c')
-rw-r--r-- | src/alloc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c index 7e4ccb4..ea19e8e 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -8,13 +8,21 @@ #define ALIGNMENT 16 /* XXX: assuming that this alignment is enough */ #define SPACE 4096 /* must be multiple of ALIGNMENT */ +#define space ((char *)realspace) + +/** + @file alloc.c + @authors djb, feh, jmh + @ref qmail + @brief Generic allocation of heap memory +*/ typedef union { char irrelevant[ALIGNMENT]; double d; } aligned; + static aligned realspace[SPACE / ALIGNMENT]; -#define space ((char *)realspace) static unsigned int avail = SPACE; /* multiple of ALIGNMENT; 0<=avail<=SPACE */ void *alloc(unsigned int n) |