path: root/com32/include
diff options
authorH. Peter Anvin <hpa@zytor.com>2010-02-23 22:32:32 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-02-23 22:32:32 -0800
commite0e20f0ab948e372444c748ffbef65a30aafe4f8 (patch)
tree67820846d529a75107014bb4ee660cde70b2464d /com32/include
parent1115737d431cf3b6a02faa90a0971bf91bef2370 (diff)
core: use better malloc; add low memory malloc; fix com32 exit
Use a better malloc for the core. In particular, use the same core that we should eventually be able to use for the entire system in Syslinux 5 -- with module awareness, etc. This code can also accommodate multiple heaps. Set up a separate heap for lowmem; the intent is to use explicit lowmem allocations instead of the static bounce buffer. The lowmem allocation is also exported via the pmapi mechanism, so modules can safely allocate lowmem. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/include')
1 files changed, 7 insertions, 0 deletions
diff --git a/com32/include/syslinux/pmapi.h b/com32/include/syslinux/pmapi.h
index 848a5540..d16d3de1 100644
--- a/com32/include/syslinux/pmapi.h
+++ b/com32/include/syslinux/pmapi.h
@@ -38,7 +38,14 @@
#include <stddef.h>
#include <inttypes.h>
+ * Note: add new members to this structure only at the end.
+ * The position of elements in this structure is an ABI.
+ */
struct com32_pmapi {
+ void *(*lmalloc)(size_t);
+ void (*lfree)(void *);
size_t (*read_file)(uint16_t *, void *, size_t);