/** * @file * * Physical Memory Manager * ======================= * * Allocating and Deallocating memory pagewise. Run mem_init() first. * * * Memory Map * ---------- * This will allow to mark a bit on/off for each page to indicte if it is * currently used or not. * * Remember that we have 4096 bytes per page so we need 1048576 bits to * cover the whole 32bit addressable memory 2^32 byte (4GB). * * This results in a 128KiB map we which allocate statically. */ #include "multiboot.h" #include "ringbuffer.h" /** * Init the physical memory manager. Please provide the multiboot_information * strucutre filled by your bootloader (as grub). * This is required for memory map et al. */ uint32_t mem_init(multiboot_information *info); void* mem_alloc_block (); void mem_free_block(void* p); uint32_t mem_get_free_blocks_count(); void mem_sysfs(ringbuffer *r, void (*f)(ringbuffer *r, char *fmt, ...)); void mem_sysfs_set(uint32_t in);