Rev 9910 | Rev 9917 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9910 | Rev 9911 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2022. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2022. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 9910 $ |
8 | $Revision: 9911 $ |
9 | 9 | ||
Line 390... | Line 390... | ||
390 | ; this will allocate physical page and a linear address somewhere, |
390 | ; this will allocate physical page and a linear address somewhere, |
391 | ; and deallocate only linear address with free_kernel_space. |
391 | ; and deallocate only linear address with free_kernel_space. |
392 | stdcall kernel_alloc, PAGE_SIZE |
392 | stdcall kernel_alloc, PAGE_SIZE |
393 | mov edi, eax |
393 | mov edi, eax |
394 | mov esi, master_tab |
394 | mov esi, master_tab |
395 | mov ecx, 1024 |
395 | mov ecx, PAGE_SIZE/4 |
396 | rep movsd |
396 | rep movsd |
397 | mov ecx, [master_tab + (OS_BASE shr 20)] |
397 | mov ecx, [master_tab + (OS_BASE shr 20)] |
398 | mov [eax], ecx |
398 | mov [eax], ecx |
399 | mov edi, eax |
399 | mov edi, eax |
400 | call get_pg_addr |
400 | call get_pg_addr |
Line 417... | Line 417... | ||
417 | cmp [ebx + PROC.heap_base], 0 |
417 | cmp [ebx + PROC.heap_base], 0 |
418 | jne .exit |
418 | jne .exit |
Line 419... | Line 419... | ||
419 | 419 | ||
420 | mov edi, [new_size] |
420 | mov edi, [new_size] |
421 | add edi, PAGE_SIZE-1 |
421 | add edi, PAGE_SIZE-1 |
422 | and edi, not 4095 |
422 | and edi, -PAGE_SIZE |
Line 423... | Line 423... | ||
423 | mov [new_size], edi |
423 | mov [new_size], edi |
424 | 424 | ||
425 | mov esi, [ebx + PROC.mem_used] |
425 | mov esi, [ebx + PROC.mem_used] |
Line 426... | Line 426... | ||
426 | add esi, PAGE_SIZE-1 |
426 | add esi, PAGE_SIZE-1 |
427 | and esi, not 4095 |
427 | and esi, -PAGE_SIZE |
428 | 428 |