From 6298589632debedd7ef75f4e72cd2593cba6d9b7 Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Wed, 10 Jul 2013 09:29:34 +0000 Subject: [PATCH] kernel: fix user_unmap git-svn-id: svn://kolibrios.org@3798 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/heap.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/trunk/core/heap.inc b/kernel/trunk/core/heap.inc index c8139ba4b2..a32294e131 100644 --- a/kernel/trunk/core/heap.inc +++ b/kernel/trunk/core/heap.inc @@ -890,6 +890,7 @@ proc user_unmap stdcall, base:dword, offset:dword, size:dword mov ebx, [offset] and ebx, not 4095 ; is it required ? + add ebx, [base] .unmap: mov eax, [edx] ; get page addres @@ -897,7 +898,7 @@ proc user_unmap stdcall, base:dword, offset:dword, size:dword jz @F test eax, PG_SHARED ; page shared ? jnz @F - mov [page_tabs+edx*4], dword 2 + mov [edx], dword 2 ; mark page as reserved invlpg [ebx] ; when we start using call free_page ; empty c-o-w page instead this ?