/kernel/trunk/core/heap.inc |
---|
20,7 → 20,6 |
MEM_LIST_OFFSET equ 8 |
FREE_BLOCK equ 4 |
USED_BLOCK equ 8 |
DONT_FREE_BLOCK equ 10h |
virtual at 0 |
MEM_BLOCK MEM_BLOCK |
729,10 → 728,8 |
sub esi, 4096 |
shr esi, 12 |
mov eax, [page_tabs+esi*4] |
test al, USED_BLOCK |
test eax, USED_BLOCK |
jz .not_used |
test al, DONT_FREE_BLOCK |
jnz .cantfree |
and eax, not 4095 |
mov ecx, eax |
768,9 → 765,6 |
xor eax, eax |
inc eax |
ret |
.cantfree: |
xor eax, eax |
ret |
endp |
user_normalize: |
842,8 → 836,6 |
xor eax, eax |
ret |
@@: |
test edx, DONT_FREE_BLOCK |
jnz .ret0 |
add ebx, 0x1FFF |
shr edx, 12 |
shr ebx, 12 |