forked from KolibriOS/kolibrios
bugfixes in 68.20 for decreasing allocated memory size
git-svn-id: svn://kolibrios.org@823 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
7079b013bb
commit
1827396bcc
@ -949,8 +949,8 @@ user_realloc:
|
|||||||
lea eax, [ecx+1]
|
lea eax, [ecx+1]
|
||||||
shl eax, 12
|
shl eax, 12
|
||||||
push eax
|
push eax
|
||||||
add ecx, ebx
|
add ecx, edx
|
||||||
add edx, ecx
|
lea edx, [ecx+ebx]
|
||||||
shl ebx, 12
|
shl ebx, 12
|
||||||
jz .ret
|
jz .ret
|
||||||
push esi
|
push esi
|
||||||
@ -962,11 +962,12 @@ user_realloc:
|
|||||||
jae .merge_done
|
jae .merge_done
|
||||||
mov eax, [page_tabs+edx*4]
|
mov eax, [page_tabs+edx*4]
|
||||||
test al, USED_BLOCK
|
test al, USED_BLOCK
|
||||||
jz .merge_done
|
jnz .merge_done
|
||||||
and dword [page_tabs+edx*4], 0
|
and dword [page_tabs+edx*4], 0
|
||||||
and eax, not 0xFFF
|
shr eax, 12
|
||||||
add ebx, eax
|
|
||||||
add edx, eax
|
add edx, eax
|
||||||
|
shl eax, 12
|
||||||
|
add ebx, eax
|
||||||
jmp @b
|
jmp @b
|
||||||
.merge_done:
|
.merge_done:
|
||||||
pop esi
|
pop esi
|
||||||
|
Loading…
Reference in New Issue
Block a user