Tiberiu Chibici
caa7718af9
==================================================== Mainly changed: HAL.FSs + Updated 'mount' call in floppy driver, now done after controller is initialized + Added 'detect' function for FAT file systems + Implemented 'initdr' driver, however still bugged + Improved logger
21 lines
383 B
C
21 lines
383 B
C
/*
|
|
* memory_free.c
|
|
*
|
|
* Created on: Aug 27, 2011
|
|
* Author: Tiberiu
|
|
*/
|
|
|
|
#include <memory-add.h>
|
|
|
|
extern uint8 mem_initialized;
|
|
|
|
void kfree(void* addr)
|
|
{
|
|
if (mem_initialized < 2) {
|
|
Error("Mem", "%#Tried to free at address 0x%x when memory manager is uninitialized.\n", ColorLightRed, (uint32)addr);
|
|
return;
|
|
}
|
|
|
|
MemHeapFree((uint32)addr, KernelHeap, KernelDirectory);
|
|
}
|