luxos/Kernel/include/memory.h
Tiberiu Chibici 0372dcee81 [GOOD] BUILD 0.1.0.470 DATE 8/30/2011 AT 6:40 PM
====================================================
Mainly changed: HAL.VFS
+ Designed virtual file system
+ Completed the VFS
+ Added verbose mode for VFS
+ Updated shell script, now shows build number when building
? TODO: Implement one file system (most likely FAT12)
? TODO: Mount floppy device
2021-09-14 18:50:50 +03:00

31 lines
1.0 KiB
C

#ifndef __MEMORY__H
#define __MEMORY__H
#include <types.h>
#include <settings.h>
#include <multiboot.h>
/***************************************************
* Basic memory operations: alloc, free *
***************************************************/
extern void* kmalloc (uint32 size);
extern void* kmalloc_a (uint32 size);
extern void* kmalloc_p (uint32 size, uint32* phys);
extern void* kmalloc_ap (uint32 size, uint32* phys);
extern void* kmrealloc (void* original, uint32 newsz);
extern void kfree (void* addr);
extern void MemoryTempInitialize (uint32 kernel_end);
extern void MemoryInitialize (MultibootInfo* info);
extern uint32 MemoryGetTotal();
extern uint32 MemoryGetFree(); // Returns total free physical memory in kilobytes
extern uint32 MemoryGetUsed(); // Total used physical memory in kbytes
extern uint32 MemoryGetFrameSize(); // Same as above functions, but in frames
extern uint32 MemoryGetFramesTotal();
extern uint32 MemoryGetFramesUsed();
extern uint32 MemoryGetFramesFree();
#endif