Rev 5565 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5565 | Rev 5596 | ||
---|---|---|---|
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: 5565 $ |
8 | $Revision: 5596 $ |
9 | 9 | ||
10 | 10 | ||
Line 319... | Line 319... | ||
319 | mov [esi+block_size], edx |
319 | mov [esi+block_size], edx |
320 | add [edi+block_base], edx |
320 | add [edi+block_base], edx |
321 | sub [edi+block_size], edx |
321 | sub [edi+block_size], edx |
Line 322... | Line 322... | ||
322 | 322 | ||
323 | mov eax, [edi+block_size] |
323 | mov eax, [edi+block_size] |
324 | calc_index eax |
324 | calc_index eax |
325 | cmp eax, [block_ind] |
325 | cmp eax, [block_ind] |
Line 326... | Line 326... | ||
326 | je .add_used |
326 | je .add_used |
Line 327... | Line 327... | ||
327 | 327 | ||
328 | list_del edi |
328 | list_del edi |
329 | 329 | ||
330 | mov ecx, [block_ind] |
330 | mov ecx, [block_ind] |
331 | lea edx, [mem_block_list+ecx*8] |
331 | lea edx, [mem_block_list+ecx*8] |
332 | cmp edx, [edx] |
332 | cmp edx, [edx] |
333 | jnz @f |
333 | jnz @f |
334 | btr [mem_block_mask], ecx |
334 | btr [mem_block_mask], ecx |
335 | @@: |
335 | @@: |
336 | bts [mem_block_mask], eax |
336 | bts [mem_block_mask], eax |
Line 337... | Line 337... | ||
337 | lea edx, [mem_block_list+eax*8] ;edx= list head |
337 | lea edx, [mem_block_list+eax*8] ;edx= list head |
Line 338... | Line 338... | ||
338 | list_add edi, edx |
338 | list_add edi, edx |
Line 346... | Line 346... | ||
346 | pop esi |
346 | pop esi |
347 | pop ebx |
347 | pop ebx |
348 | ret |
348 | ret |
Line 349... | Line 349... | ||
349 | 349 | ||
350 | .m_eq_size: |
350 | .m_eq_size: |
351 | list_del edi |
351 | list_del edi |
352 | lea edx, [mem_block_list+ebx*8] |
352 | lea edx, [mem_block_list+ebx*8] |
353 | cmp edx, [edx] |
353 | cmp edx, [edx] |
354 | jnz @f |
354 | jnz @f |
355 | btr [mem_block_mask], ebx |
355 | btr [mem_block_mask], ebx |