Hashmaps now autoexpand based on loadFactor.
git-svn-id: https://spexeah.com:8443/svn/Asuro@1298 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
1 parent
b802ac9607
commit
984b6a89c8
5 files changed
+111
-54
No files matched your search
@@ -2040,6 +2040,7 @@ begin
|
||||
writestring(identifier);
|
||||
writestring('] ');
|
||||
writestring(str);
|
||||
redrawWindows;
|
||||
end;
|
||||
|
||||
procedure Outputln(identifier : PChar; str : PChar);
|
||||
|
||||
+16
@@ -262,6 +262,21 @@ begin
|
||||
printCapabilities(getTerminalHWND);
|
||||
end;
|
||||
|
||||
procedure enableSSE();
|
||||
begin
|
||||
If CPUID.Capabilities0^.SSE then begin
|
||||
asm
|
||||
MOV EAX, CR0
|
||||
AND AX, $FFFB
|
||||
OR AX, $2
|
||||
MOV CR0, EAX
|
||||
MOV EAX, CR4
|
||||
OR AX, 3 shl 9
|
||||
MOV CR4, EAX
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure init();
|
||||
begin
|
||||
terminal.registerCommand('CPU', @Terminal_Command_CPU, 'CPU Info.');
|
||||
@@ -270,6 +285,7 @@ begin
|
||||
getCPUIdentifier;
|
||||
getCPUCapabilities;
|
||||
getCPUClockSpeed;
|
||||
enableSSE;
|
||||
end;
|
||||
|
||||
end.
|
||||
+90
-51
File diff suppressed because it is too large.
Load diff
+3
-2
@@ -178,7 +178,9 @@ begin
|
||||
console.init();
|
||||
|
||||
{ CPUID }
|
||||
console.outputln('CPU', 'Init begin');
|
||||
cpu.init();
|
||||
console.outputln('CPU', 'Init end');
|
||||
|
||||
{ Call Tracer }
|
||||
tracer.init();
|
||||
@@ -242,8 +244,7 @@ begin
|
||||
|
||||
tracer.push_trace('kmain.TICK');
|
||||
|
||||
|
||||
HM:= hashmap.new(10000);
|
||||
HM:= hashmap.new(16);
|
||||
hashmap.add(HM, 'testificate', void(1));
|
||||
hashmap.add(HM, 'asuro', void(10));
|
||||
hashmap.add(HM, 'myfirstos', void(100));
|
||||
|
||||
+1
-1
@@ -63,8 +63,8 @@ dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0
|
||||
dd 1280
|
||||
dd 1024
|
||||
dd 768
|
||||
dd 16
|
||||
|
||||
;
|
||||
|
||||
Reference in new issue
Block a user