From: Alan Cox Date: Sat, 18 Jun 2016 21:52:48 +0000 (+0100) Subject: malloc: commit new header file X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=1da94c7e93682b97136a9fe16c7f5cfd9bed4c0f;p=FUZIX.git malloc: commit new header file Oops... 8( --- diff --git a/Library/libs/malloc.h b/Library/libs/malloc.h new file mode 100644 index 00000000..7dc5c480 --- /dev/null +++ b/Library/libs/malloc.h @@ -0,0 +1,13 @@ +/* We assume this is a suitable alignment for anything. Must be such that + BLKSIZE is an exact divide */ +struct memh { + struct memh *next; + size_t size; +}; + +extern struct memh __mroot; +extern struct memh *__mfreeptr; + +#define MH(p) (((struct memh *)(p)) - 1) +#define BRKSIZE (512 / sizeof(struct memh)) +