reducing the size of the kernel image by using unintialized global arrays

This commit is contained in:
Stefan Lankes 2011-06-22 08:38:49 +02:00
parent 9095773735
commit cf6fdf4067

View file

@ -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;