summaryrefslogtreecommitdiff
path: root/com32/lib/syslinux/shuffle.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-02 17:26:06 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-02 17:26:06 -0700
commit9cd4a3b4fb21482b474d63486fe677966eeb2761 (patch)
tree674f379d360aafbdb94b5748e70d25ce12a47b4b /com32/lib/syslinux/shuffle.c
parent6601e0554dbb56b0ecd784eed8ad9286b6182f1d (diff)
downloadsyslinux-9cd4a3b4fb21482b474d63486fe677966eeb2761.tar.gz
shuffle: align the shuffle safe area
For performance, align the shuffle safe area to a dword boundary. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/lib/syslinux/shuffle.c')
-rw-r--r--com32/lib/syslinux/shuffle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/com32/lib/syslinux/shuffle.c b/com32/lib/syslinux/shuffle.c
index 196fc64a..6c33d0a5 100644
--- a/com32/lib/syslinux/shuffle.c
+++ b/com32/lib/syslinux/shuffle.c
@@ -141,11 +141,12 @@ int syslinux_do_shuffle(struct syslinux_movelist *fraglist,
sizeof(struct shuffle_descriptor)*DESC_BLOCK_SIZE
+ sizeof(struct shuffle_descriptor) + shuffler_size;
- if (descfree < descmem)
+ descaddr = (desczone + descfree - descmem) & ~3;
+
+ if (descaddr < desczone)
goto bail; /* No memory block large enough */
/* Mark memory used by shuffle descriptors as reserved */
- descaddr = desczone + descfree - descmem;
if (syslinux_add_memmap(&rxmap, descaddr, descmem, SMT_RESERVED))
goto bail;