A patch for f.64 - now you can not ask for more memory than available of free memory.

git-svn-id: svn://kolibrios.org@4313 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2013-11-29 18:31:49 +00:00
parent 37b4e70244
commit 2e14ef3302
1 changed files with 11 additions and 0 deletions

View File

@ -386,7 +386,18 @@ sys_resize_app_memory:
; cmp eax,1 ; cmp eax,1
dec ebx dec ebx
jnz .no_application_mem_resize jnz .no_application_mem_resize
mov eax, [pg_data.pages_free]
shl eax, 12
cmp eax, ecx
jae @f
xor eax, eax
inc eax
jmp .store_result
@@:
stdcall new_mem_resize, ecx stdcall new_mem_resize, ecx
.store_result:
mov [esp+32], eax mov [esp+32], eax
.no_application_mem_resize: .no_application_mem_resize:
ret ret