diff --git a/kernel/trunk/core/heap.inc b/kernel/trunk/core/heap.inc index e02faf8ce3..090e6278ab 100644 --- a/kernel/trunk/core/heap.inc +++ b/kernel/trunk/core/heap.inc @@ -680,6 +680,7 @@ l_0: and eax, 0xFFFFF000 cmp eax, ecx ;alloc_size jb m_next + jz @f mov edx, esi add edx, ecx @@ -687,7 +688,7 @@ l_0: or eax, FREE_BLOCK shr edx, 12 mov [pages_tab+edx*4], eax - +@@: or ecx, USED_BLOCK mov [pages_tab+ebx*4], ecx shr ecx, 12 @@ -753,6 +754,8 @@ proc user_free stdcall, base:dword shl ebx, 8 mov esi, dword [ebx+PROC_BASE+APPDATA.heap_base]; heap_base mov edi, dword [ebx+PROC_BASE+APPDATA.heap_top]; heap_top + add esi, new_app_base + add edi, new_app_base shr esi, 12 shr edi, 12 @@: diff --git a/kernel/trunk/proc32.inc b/kernel/trunk/proc32.inc index 23c56b03c1..98a1bd3342 100644 --- a/kernel/trunk/proc32.inc +++ b/kernel/trunk/proc32.inc @@ -71,7 +71,7 @@ macro epiloguedef procname,flag,parmbytes,localbytes,reglist if parmbytes | localbytes leave end if - if flag and 10000b + if (flag and 10000b) | (parmbytes=0) retn else retn parmbytes