Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 170 → Rev 169

/kernel/trunk/core/taskman.inc
1,6 → 1,4
GREEDY_KERNEL equ 0; 1
 
 
struc APP_HEADER_00
{ .banner dq ?
.version dd ? ;+8
136,28 → 134,19
mov ebx, eax
shr eax, 12
mov [app_pages], eax
 
add ebx, 0x3FFFFF
and ebx, NOT(0x3FFFFF)
shr ebx, 22
mov [app_tabs], ebx
 
mov ecx, [img_size]
add ecx, 4095
and ecx, NOT(4095)
mov eax, [img_size]
add eax, 4095
and eax, NOT(4095)
 
mov [img_size], ecx
shr ecx, 12
mov [img_pages], ecx
mov [img_size], eax
shr eax, 12
mov [img_pages], eax
 
if GREEDY_KERNEL
lea eax, [ecx+ebx+2] ;only image size
else
lea eax, [eax+ebx+2] ;all requested memory
end if
cmp eax, [pg_data.pages_free]
ja .fail
 
call alloc_page
test eax, eax
jz .fail
550,12 → 539,10
rep stosb
 
; read header
 
lea eax, [file_size]
mov ebx, [eax]
mov [img_size], ebx
mov edi, TMP_BUFF
call [fn_read]
 
test eax, eax
jnz .err
 
574,11 → 561,7
 
mov eax, cr3
mov [save_cr3], eax
if GREEDY_KERNEL
stdcall create_app_space,[app_mem],[img_size]
else
stdcall create_app_space,[app_mem],[app_mem]
end if
stdcall create_app_space,[app_mem], [app_mem];[file_size]
test eax, eax
jz .failed