Rev 8129 | Rev 8184 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8129 | Rev 8170 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | ;/*** |
1 | ;/*** |
Line 2... | Line 2... | ||
2 | 2 | ||
Line 3... | Line 3... | ||
3 | MenuetHeapInit = @@Kolibri@_HeapInit$qpvt1t1 |
3 | KolibriHeapInit = @@Kolibri@_HeapInit$qpvt1t1 |
Line 4... | Line 4... | ||
4 | 4 | ||
Line 5... | Line 5... | ||
5 | MenuetHeapAlloc = @@Kolibri@Alloc$qui |
5 | KolibriHeapAlloc = @@Kolibri@Alloc$qui |
Line 6... | Line 6... | ||
6 | 6 | ||
Line 7... | Line 7... | ||
7 | MenuetHeapReAlloc = @@Kolibri@ReAlloc$qpvui |
7 | KolibriHeapReAlloc = @@Kolibri@ReAlloc$qpvui |
8 | 8 | ||
9 | MenuetHeapFree = @@Kolibri@Free$qpv |
9 | KolibriHeapFree = @@Kolibri@Free$qpv |
10 | 10 | ||
Line 18... | Line 18... | ||
18 | int 0x40 |
18 | int 0x40 |
19 | pop ebx |
19 | pop ebx |
20 | test eax,eax |
20 | test eax,eax |
21 | jnz .set_use_memory_nomem |
21 | jnz .set_use_memory_nomem |
22 | push ecx |
22 | push ecx |
23 | push dword [@Kolibri@_MenuetMemBlock] |
23 | push dword [@Kolibri@_KolibriMemBlock] |
24 | call @@MemoryHeap@ResizeBlock$q20MemoryHeap@TMemBlockpv |
24 | call @@MemoryHeap@ResizeBlock$q20MemoryHeap@TMemBlockpv |
25 | add esp,8 |
25 | add esp,8 |
26 | mov al,1 |
26 | mov al,1 |
27 | ret |
27 | ret |
28 | .set_use_memory_nomem: |
28 | .set_use_memory_nomem: |
Line 56... | Line 56... | ||
56 | jmp .heap_free_tf_wait |
56 | jmp .heap_free_tf_wait |
57 | .heap_free_tf_wait_loop: |
57 | .heap_free_tf_wait_loop: |
58 | mov eax,5 |
58 | mov eax,5 |
59 | int 0x40 |
59 | int 0x40 |
60 | shl ebx,1 |
60 | shl ebx,1 |
61 | cmp ebx,MENUET_MUTEX_MAX_TIME_WAIT |
61 | cmp ebx,KOLIBRI_MUTEX_MAX_TIME_WAIT |
62 | jna .heap_free_tf_wait |
62 | jna .heap_free_tf_wait |
63 | mov ebx,MENUET_MUTEX_MAX_TIME_WAIT |
63 | mov ebx,KOLIBRI_MUTEX_MAX_TIME_WAIT |
64 | .heap_free_tf_wait: |
64 | .heap_free_tf_wait: |
65 | cmp dword [ecx],0 |
65 | cmp dword [ecx],0 |
66 | jnz @Kolibri@ExitProcess$qv |
66 | jnz @Kolibri@ExitProcess$qv |
67 | lock bts dword [@Kolibri@_MemHeapMutex],0 |
67 | lock bts dword [@Kolibri@_MemHeapMutex],0 |
68 | jc .heap_free_tf_wait_loop |
68 | jc .heap_free_tf_wait_loop |
69 | push dword [esp+4] |
69 | push dword [esp+4] |
70 | push @Kolibri@_MenuetFreeSpace |
70 | push @Kolibri@_KolibriFreeSpace |
71 | call @@MemoryHeap@Free$qr21MemoryHeap@TFreeSpacepv |
71 | call @@MemoryHeap@Free$qr21MemoryHeap@TFreeSpacepv |
72 | add esp,8 |
72 | add esp,8 |
73 | mov byte [@Kolibri@_MemHeapMutex],0x40 |
73 | mov byte [@Kolibri@_MemHeapMutex],0x40 |
74 | or eax,-1 |
74 | or eax,-1 |
75 | int 0x40 |
75 | int 0x40 |