malloc: commit new header file
authorAlan Cox <alan@linux.intel.com>
Sat, 18 Jun 2016 21:52:48 +0000 (22:52 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 18 Jun 2016 21:52:48 +0000 (22:52 +0100)
Oops... 8(

Library/libs/malloc.h [new file with mode: 0644]

diff --git a/Library/libs/malloc.h b/Library/libs/malloc.h
new file mode 100644 (file)
index 0000000..7dc5c48
--- /dev/null
@@ -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))
+