forked from KolibriOS/kolibrios
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:
parent
37b4e70244
commit
2e14ef3302
@ -386,7 +386,18 @@ sys_resize_app_memory:
|
||||
; cmp eax,1
|
||||
dec ebx
|
||||
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
|
||||
.store_result:
|
||||
mov [esp+32], eax
|
||||
.no_application_mem_resize:
|
||||
ret
|
||||
|
Loading…
Reference in New Issue
Block a user