aboutsummaryrefslogtreecommitdiffstats
path: root/com32/sysdump/memmap.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-06-18 18:27:55 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-06-18 18:27:55 -0700
commit46971666d3fbe15db020029034747a64738754aa (patch)
treeb77c7c7c3229966a8fe3255697fa98e84c9f82e0 /com32/sysdump/memmap.c
parent618d11938982a04070ded7291a9f12c3b0452d1d (diff)
downloadsyslinux-46971666d3fbe15db020029034747a64738754aa.tar.gz
syslinux-46971666d3fbe15db020029034747a64738754aa.tar.xz
syslinux-46971666d3fbe15db020029034747a64738754aa.zip
sysdump: use lmalloc/lfree
Use lmalloc/lfree instead of using the fixed (obsolete) bounce buffer. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'com32/sysdump/memmap.c')
-rw-r--r--com32/sysdump/memmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/com32/sysdump/memmap.c b/com32/sysdump/memmap.c
index a85f0925..251107d5 100644
--- a/com32/sysdump/memmap.c
+++ b/com32/sysdump/memmap.c
@@ -19,10 +19,12 @@ struct e820_info {
static void dump_e820(struct backend *be)
{
com32sys_t ireg, oreg;
- struct e820_info *curr = __com32.cs_bounce;
+ struct e820_info *curr;
struct e820_info *buf, *p;
int nentry, nalloc;
+ curr = lmalloc(sizeof *curr);
+
buf = p = NULL;
nentry = nalloc = 0;
memset(&ireg, 0, sizeof ireg);
@@ -56,7 +58,9 @@ static void dump_e820(struct backend *be)
if (nentry)
cpio_writefile(be, "memmap/15e820", buf, nentry*sizeof *buf);
+
free(buf);
+ lfree(curr);
}
void dump_memory_map(struct backend *be)