reducing the size of the kernel image by using unintialized global arrays
This commit is contained in:
parent
9095773735
commit
cf6fdf4067
1 changed files with 4 additions and 1 deletions
|
@ -39,7 +39,7 @@
|
|||
*
|
||||
* Set whole address space as occupied
|
||||
*/
|
||||
static uint8_t bitmap[BITMAP_SIZE] = {[0 ... BITMAP_SIZE-1] = 0xFF};
|
||||
static uint8_t bitmap[BITMAP_SIZE]; // = {[0 ... BITMAP_SIZE-1] = 0xFF};
|
||||
static spinlock_t bitmap_lock = SPINLOCK_INIT;
|
||||
static size_t alloc_start;
|
||||
atomic_int32_t total_pages = ATOMIC_INIT(0);
|
||||
|
@ -94,6 +94,9 @@ int mmu_init(void)
|
|||
unsigned int i;
|
||||
size_t addr;
|
||||
|
||||
// at first, set default value of the bitmap
|
||||
memset(bitmap, 0xFF, sizeof(uint8_t)*BITMAP_SIZE);
|
||||
|
||||
#ifdef CONFIG_MULTIBOOT
|
||||
if (mb_info && (mb_info->flags & MULTIBOOT_INFO_MEM_MAP)) {
|
||||
size_t end_addr;
|
||||
|
|
Loading…
Add table
Reference in a new issue