Subversion Repositories Kolibri OS

Rev

Rev 2156 | Rev 2259 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2156 Rev 2166
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2009. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2009. 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
$Revision: 2156 $
-
 
Line 9... Line 8...
9
 
8
$Revision: 2166 $
10
HASH_IT  = 1
9
 
11
 
10
 
12
struc MEM_BLOCK
11
struc MEM_BLOCK
Line 277... Line 276...
277
 
276
 
278
align 4
277
align 4
279
proc alloc_kernel_space stdcall, size:dword
278
proc alloc_kernel_space stdcall, size:dword
Line 280... Line -...
280
           local block_ind:DWORD
-
 
281
 
-
 
282
;           xchg bx, bx
279
           local block_ind:DWORD
283
 
280
 
284
           push ebx
281
           push ebx
Line 285... Line 282...
285
           push esi
282
           push esi
Line 384... Line 381...
384
endp
381
endp
Line 385... Line 382...
385
 
382
 
386
align 4
383
align 4
Line 387... Line -...
387
proc free_kernel_space stdcall uses ebx ecx edx esi edi, base:dword
-
 
388
 
-
 
389
;           xchg bx, bx
384
proc free_kernel_space stdcall uses ebx ecx edx esi edi, base:dword
390
 
385
 
Line 391... Line 386...
391
           mov ecx, heap_mutex
386
           mov ecx, heap_mutex
Line 564... Line 559...
564
           cmp [esi+block_flags], USED_BLOCK
559
           cmp [esi+block_flags], USED_BLOCK
565
           jne .fail
560
           jne .fail
Line 566... Line 561...
566
 
561
 
Line -... Line 562...
-
 
562
           call mutex_unlock
567
           call mutex_unlock
563
 
568
 
564
           mov eax, [esi+block_base]
569
           mov ecx, [esi+block_size];
565
           mov ecx, [esi+block_size]
570
           shr ecx, 12
566
           shr ecx, 12
571
           call release_pages   ;eax, ecx
567
           call release_pages   ;eax, ecx
572
           stdcall free_kernel_space, [base]
568
           stdcall free_kernel_space, [base]