forked from KolibriOS/kolibrios
fixed error in kernel_alloc_space
git-svn-id: svn://kolibrios.org@192 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
1d515a0c77
commit
be5ccc0bc1
@ -316,16 +316,12 @@ proc alloc_kernel_space stdcall, size:dword
|
|||||||
cmp eax, [block_ind]
|
cmp eax, [block_ind]
|
||||||
je .m_eq_ind
|
je .m_eq_ind
|
||||||
|
|
||||||
mov ebx, [edi+list_next]
|
remove_from_list edi
|
||||||
test ebx, ebx
|
|
||||||
jz @f
|
|
||||||
|
|
||||||
mov [ebx+list_prev], edi
|
|
||||||
@@:
|
|
||||||
mov ecx, [block_ind]
|
mov ecx, [block_ind]
|
||||||
mov [mem_block_list+ecx*4], ebx
|
mov [mem_block_list+ecx*4], ebx
|
||||||
|
|
||||||
and ebx, ebx
|
test ebx, ebx
|
||||||
jnz @f
|
jnz @f
|
||||||
btr [mem_block_mask], ecx
|
btr [mem_block_mask], ecx
|
||||||
@@:
|
@@:
|
||||||
@ -354,17 +350,16 @@ proc alloc_kernel_space stdcall, size:dword
|
|||||||
|
|
||||||
.m_eq_size:
|
.m_eq_size:
|
||||||
remove_from_list edi
|
remove_from_list edi
|
||||||
mov [mem_block_list+ecx*4], edx
|
mov [mem_block_list+ebx*4], edx
|
||||||
and edx, edx
|
and edx, edx
|
||||||
jnz @f
|
jnz @f
|
||||||
mov ecx, [block_ind]
|
btr [mem_block_mask], ebx
|
||||||
btr [mem_block_mask], ecx
|
|
||||||
@@:
|
@@:
|
||||||
mov ebx, [mem_used_list]
|
mov ecx, [mem_used_list]
|
||||||
mov [edi+list_next], ebx
|
mov [edi+list_next], ecx
|
||||||
test ebx, ebx
|
test ecx, ecx
|
||||||
jnz @f
|
jnz @f
|
||||||
mov [ebx+list_prev], edi
|
mov [ecx+list_prev], edi
|
||||||
@@:
|
@@:
|
||||||
mov [mem_used_list], edi
|
mov [mem_used_list], edi
|
||||||
mov [edi+block_flags], USED_BLOCK
|
mov [edi+block_flags], USED_BLOCK
|
||||||
|
Loading…
Reference in New Issue
Block a user