bootloader: Make releasing the heap the platform loader's responsibility.
Otherwise, platform loaders couldn't make heap allocations inside platform_start_kernel(), which some loaders (e.g. EFI) do. Implement calling heap_release() for the BIOS loaders at least. This gets us back the ~1.5MB of bootloader heap memory there.
This commit is contained in:
@@ -1,23 +1,28 @@
|
||||
/*
|
||||
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
|
||||
** Distributed under the terms of the MIT License.
|
||||
*/
|
||||
* Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef KERNEL_BOOT_HEAP_H
|
||||
#define KERNEL_BOOT_HEAP_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
#include <boot/stage2_args.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern void heap_release(struct stage2_args *args);
|
||||
extern void heap_print_statistics();
|
||||
|
||||
extern status_t heap_init(struct stage2_args *args);
|
||||
extern void heap_print_statistics();
|
||||
extern void heap_release();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* KERNEL_BOOT_HEAP_H */
|
||||
|
||||
Reference in New Issue
Block a user