Rev 5363 | Rev 6974 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5363 | Rev 6893 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2015. 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: 5363 $ |
8 | $Revision: 6893 $ |
9 | 9 | ||
10 | 10 | ||
Line 593... | Line 593... | ||
593 | ret |
593 | ret |
594 | endp |
594 | endp |
Line 595... | Line 595... | ||
595 | 595 | ||
596 | align 4 |
596 | align 4 |
597 | proc user_alloc stdcall, alloc_size:dword |
- | |
598 | - | ||
599 | push ebx |
597 | proc user_alloc stdcall, alloc_size:dword |
600 | push esi |
598 | push ebx esi edi |
601 | push edi |
- | |
602 | - | ||
603 | mov ebx, [current_process] |
599 | call init_heap |
604 | lea ecx, [ebx+PROC.heap_lock] |
600 | lea ecx, [ebx+PROC.heap_lock] |
605 | call mutex_lock |
- | |
606 | 601 | call mutex_lock |
|
607 | mov ecx, [alloc_size] |
602 | mov ecx, [alloc_size] |
608 | add ecx, (4095+PAGE_SIZE) |
603 | add ecx, (4095+PAGE_SIZE) |
609 | and ecx, not 4095 |
- | |
610 | 604 | and ecx, not 4095 |
|
611 | mov esi, dword [ebx+PROC.heap_base] ; heap_base |
605 | mov esi, dword [ebx+PROC.heap_base] ; heap_base |
612 | mov edi, dword [ebx+PROC.heap_top] ; heap_top |
606 | mov edi, dword [ebx+PROC.heap_top] ; heap_top |
613 | .scan: |
607 | .scan: |
614 | cmp esi, edi |
608 | cmp esi, edi |