mirror of
https://github.com/ipxe/ipxe
synced 2026-01-24 21:24:47 +03:00
[malloc] Ensure free memory blocks remain aligned
When allocating memory with a non-zero alignment offset, the free memory block structure following the allocation may end up improperly aligned. Ensure that free memory blocks always remain aligned to the size of the free memory block structure. Ensure that the initial heap is also correctly aligned, thereby allowing the logic for leaking undersized free memory blocks to be omitted. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -28,7 +28,6 @@ extern size_t maxusedmem;
|
||||
extern void * __malloc alloc_memblock ( size_t size, size_t align,
|
||||
size_t offset );
|
||||
extern void free_memblock ( void *ptr, size_t size );
|
||||
extern void mpopulate ( void *start, size_t len );
|
||||
extern void mdumpfree ( void );
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user