diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2013-12-14 13:14:02 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-12-27 12:40:02 -0500 |
commit | 743c1575390188fd628ecd0333bb679e8ecc0bec (patch) | |
tree | 2d26092e6d034d39670c10770d3a95ade70ad6bd /src/fw | |
parent | 95b3d3286ff65d44f3d0240c6d7be4bec7671375 (diff) | |
download | seabios-743c1575390188fd628ecd0333bb679e8ecc0bec.tar.gz |
Remove the pmm handle argument from _malloc().
The PMM handle argument will almost always be 0xffffffff. Use
separate code for the few rare cases where it may not be the default
value. Gcc produces better code if _malloc() only requires three
parameters.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/fw')
-rw-r--r-- | src/fw/csm.c | 4 | ||||
-rw-r--r-- | src/fw/romfile_loader.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/fw/csm.c b/src/fw/csm.c index dfb0d12f..a44ed267 100644 --- a/src/fw/csm.c +++ b/src/fw/csm.c @@ -257,9 +257,9 @@ handle_csm_0006(struct bregs *regs) size, align, region); if (region & 2) - chunk = _malloc(&ZoneLow, MALLOC_DEFAULT_HANDLE, size, align); + chunk = _malloc(&ZoneLow, size, align); if (!chunk && (region & 1)) - chunk = _malloc(&ZoneFSeg, MALLOC_DEFAULT_HANDLE, size, align); + chunk = _malloc(&ZoneFSeg, size, align); dprintf(3, "Legacy16GetTableAddress size %x align %x region %d yields %p\n", size, align, region, chunk); diff --git a/src/fw/romfile_loader.c b/src/fw/romfile_loader.c index 325a0fa3..f4b17ff9 100644 --- a/src/fw/romfile_loader.c +++ b/src/fw/romfile_loader.c @@ -57,7 +57,7 @@ static void romfile_loader_allocate(struct romfile_loader_entry_s *entry, file->file = romfile_find(entry->alloc_file); if (!file->file || !file->file->size) return; - data = _malloc(zone, MALLOC_DEFAULT_HANDLE, file->file->size, alloc_align); + data = _malloc(zone, file->file->size, alloc_align); if (!data) { warn_noalloc(); return; |