From e4aa2672b012dafef2dc61930148e69cfffe0d6f Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Fri, 24 Feb 2012 19:20:05 +0000 Subject: [PATCH] Decrease size of shadow buffer for VGA. The old size is 2-fold excess of actual need. git-svn-id: svn://kolibrios.org@2398 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/memory.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/trunk/core/memory.inc b/kernel/trunk/core/memory.inc index aaaced57fb..a2e36309c5 100644 --- a/kernel/trunk/core/memory.inc +++ b/kernel/trunk/core/memory.inc @@ -358,7 +358,9 @@ proc init_LFB cmp dword [LFBAddress], -1 jne @f mov [BOOT_VAR+0x901c], byte 2 - stdcall alloc_pages, (0x280000 / 4096) +; max VGA=640*480*4=1228800 bytes +; + 32*640*4=81920 bytes for mouse pointer + stdcall alloc_pages, ((1228800+81920)/4096) push eax call alloc_page @@ -366,7 +368,9 @@ proc init_LFB pop eax or eax, PG_UW mov ebx, LFB_BASE - mov ecx, 0x280000 / 4096 +; max VGA=640*480*4=1228800 bytes +; + 32*640*4=81920 bytes for mouse pointer + mov ecx, (1228800+81920)/4096 call commit_pages mov [LFBAddress], dword LFB_BASE ret