Commit for safety.

git-svn-id: https://spexeah.com:8443/svn/Asuro@107 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
kieron
2017-05-18 15:32:27 +00:00
parent e7e5eccc9b
commit 158eeba82f
7 changed files with 5 additions and 4 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+1
View File
@@ -56,6 +56,7 @@ begin
kfree(pint2); kfree(pint2);
console.writeintln(pint^); console.writeintln(pint^);
kfree(pint); kfree(pint);
pint2:= kalloc(128);
util.halt_and_catch_fire; util.halt_and_catch_fire;
STI; STI;
+4 -4
View File
@@ -45,8 +45,8 @@ var
miss : boolean; miss : boolean;
begin begin
blocks:= size div 8; blocks:= size div ALLOC_SPACE;
rem:= size - (blocks * 8); rem:= size - (blocks * ALLOC_SPACE);
if rem > 0 then blocks:= blocks + 1; if rem > 0 then blocks:= blocks + 1;
kalloc:= nil; kalloc:= nil;
for i:=0 to MAX_ENTRIES-1 do begin for i:=0 to MAX_ENTRIES-1 do begin
@@ -58,7 +58,7 @@ begin
end; end;
end; end;
if not miss then begin if not miss then begin
kalloc:= void(Memory_Start+(i * 8)); kalloc:= void(Memory_Start+(i * ALLOC_SPACE));
for j:=0 to blocks-1 do begin for j:=0 to blocks-1 do begin
Memory_Manager[i+j].Present:= true; Memory_Manager[i+j].Present:= true;
Memory_Manager[i+j].Length:= 0; Memory_Manager[i+j].Length:= 0;
@@ -86,7 +86,7 @@ begin
INT 13 INT 13
end; end;
end; end;
Block:= (uint32(Area) - Memory_Start) div 8; Block:= (uint32(Area) - Memory_Start) div ALLOC_SPACE;
if Memory_Manager[Block].Present then begin if Memory_Manager[Block].Present then begin
If Memory_Manager[Block].Length > 0 then begin If Memory_Manager[Block].Length > 0 then begin
bLength:= Memory_Manager[Block].Length; bLength:= Memory_Manager[Block].Length;