kernel: fix user_unmap

git-svn-id: svn://kolibrios.org@3798 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2013-07-10 09:29:34 +00:00
parent f14defbdce
commit 6298589632

View File

@ -890,6 +890,7 @@ proc user_unmap stdcall, base:dword, offset:dword, size:dword
mov ebx, [offset] mov ebx, [offset]
and ebx, not 4095 ; is it required ? and ebx, not 4095 ; is it required ?
add ebx, [base]
.unmap: .unmap:
mov eax, [edx] ; get page addres mov eax, [edx] ; get page addres
@ -897,7 +898,7 @@ proc user_unmap stdcall, base:dword, offset:dword, size:dword
jz @F jz @F
test eax, PG_SHARED ; page shared ? test eax, PG_SHARED ; page shared ?
jnz @F jnz @F
mov [page_tabs+edx*4], dword 2 mov [edx], dword 2
; mark page as reserved ; mark page as reserved
invlpg [ebx] ; when we start using invlpg [ebx] ; when we start using
call free_page ; empty c-o-w page instead this ? call free_page ; empty c-o-w page instead this ?