MemoryManager WTF?!
git-svn-id: https://spexeah.com:8443/svn/Asuro@101 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
ca9537f89f
commit
f2a42134c7
BIN
bin/kernel.bin
BIN
bin/kernel.bin
Binary file not shown.
@ -7,6 +7,8 @@ echo "======================="
|
||||
echo " "
|
||||
echo "Compiling ASM Stub..."
|
||||
echo " "
|
||||
rm lib/*
|
||||
|
||||
nasm -f elf src/stub/stub.asm -o lib/stub.o
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
|
Binary file not shown.
BIN
lib/kernel.o
BIN
lib/kernel.o
Binary file not shown.
BIN
lib/kernel.ppu
BIN
lib/kernel.ppu
Binary file not shown.
BIN
lib/keyboard.ppu
BIN
lib/keyboard.ppu
Binary file not shown.
Binary file not shown.
BIN
lib/libpkernel.a
BIN
lib/libpkernel.a
Binary file not shown.
Binary file not shown.
BIN
lib/libpsystem.a
BIN
lib/libpsystem.a
Binary file not shown.
BIN
lib/system.ppu
BIN
lib/system.ppu
Binary file not shown.
@ -12,7 +12,8 @@ uses
|
||||
isr32,
|
||||
console,
|
||||
bios_data_area,
|
||||
keyboard;
|
||||
keyboard,
|
||||
memorymanager;
|
||||
|
||||
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall;
|
||||
|
||||
@ -78,7 +79,6 @@ begin
|
||||
console.writeint(((mbinfo^.mem_upper + 1000) div 1024) + 1);
|
||||
console.writestringln('MB');
|
||||
console.setdefaultattribute(console.combinecolors(lYellow, Black));
|
||||
console.writewordln(uint32(@util.endptr) - KERNEL_VIRTUAL_BASE);
|
||||
util.halt_and_dont_catch_fire;
|
||||
end;
|
||||
|
||||
|
37
src/memorymanager.pas
Normal file
37
src/memorymanager.pas
Normal file
@ -0,0 +1,37 @@
|
||||
unit memorymanager;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
util;
|
||||
|
||||
const
|
||||
ALLOC_SPACE = 8; //64-Bit Allocations
|
||||
MAX_ENTRIES = $FFFF;
|
||||
|
||||
procedure init();
|
||||
function kalloc(size : uint32) : void;
|
||||
procedure kfree(area : void);
|
||||
|
||||
implementation
|
||||
|
||||
var
|
||||
Memory_Start : uint32;
|
||||
Memory_Manager : bitpacked array[1..MAX_ENTRIES] of Boolean;
|
||||
|
||||
procedure init();
|
||||
begin
|
||||
Memory_Start:= uint32(@util.endptr);
|
||||
end;
|
||||
|
||||
function kalloc(size : uint32) : void;
|
||||
begin
|
||||
kalloc:= void(0);
|
||||
end;
|
||||
|
||||
function kfree(area : void);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
end.
|
Loading…
x
Reference in New Issue
Block a user