forked from KolibriOS/kolibrios
malloc/free do not change ebx now
git-svn-id: svn://kolibrios.org@3681 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
eebdcf71f9
commit
1a7694e453
@ -349,10 +349,8 @@ disk_add:
|
||||
inc eax
|
||||
cmp byte [ebx+eax-1], 0
|
||||
jnz @b
|
||||
; 2b. Call the heap manager. Note that it can change ebx.
|
||||
push ebx
|
||||
; 2b. Call the heap manager.
|
||||
call malloc
|
||||
pop ebx
|
||||
; 2c. Check the result. If allocation failed, go to 7.
|
||||
pop esi ; restore allocated pointer to DISK
|
||||
test eax, eax
|
||||
|
@ -459,10 +459,7 @@ proc usb_after_set_endpoint_size
|
||||
; save length for step 2
|
||||
push eax
|
||||
add eax, sizeof.usb_device_data + 8
|
||||
; Note that malloc destroys ebx.
|
||||
push ebx
|
||||
call malloc
|
||||
pop ebx
|
||||
; 1b. If failed, say something to the debug board and stop the initialization.
|
||||
test eax, eax
|
||||
jz .nomemory
|
||||
|
@ -1640,12 +1640,10 @@ end virtual
|
||||
; 1c. We need a temporary buffer. Allocate [packetSize]*2 bytes, so that
|
||||
; there must be [packetSize] bytes on one page,
|
||||
; plus space for a header uhci_original_buffer.
|
||||
push ebx
|
||||
mov eax, [.packetSize]
|
||||
add eax, eax
|
||||
add eax, sizeof.uhci_original_buffer
|
||||
call malloc
|
||||
pop ebx
|
||||
; 1d. If failed, return zero.
|
||||
test eax, eax
|
||||
jz .nothing
|
||||
|
@ -22,7 +22,7 @@ $Revision$
|
||||
;
|
||||
align 4
|
||||
malloc:
|
||||
push esi
|
||||
push ebx esi
|
||||
|
||||
; nb = ((size+7)&~7)+8;
|
||||
|
||||
@ -96,7 +96,7 @@ malloc:
|
||||
mov ecx, mst.mutex
|
||||
call mutex_unlock
|
||||
mov eax, esi
|
||||
pop esi
|
||||
pop esi ebx
|
||||
ret
|
||||
|
||||
.split:
|
||||
@ -205,7 +205,7 @@ free:
|
||||
test eax, eax
|
||||
jz .exit
|
||||
|
||||
push edi
|
||||
push ebx edi
|
||||
mov edi, eax
|
||||
add edi, -8
|
||||
|
||||
@ -298,7 +298,7 @@ free:
|
||||
mov eax, esi
|
||||
pop esi
|
||||
.fail:
|
||||
pop edi
|
||||
pop edi ebx
|
||||
.exit:
|
||||
ret
|
||||
|
||||
|
@ -166,10 +166,8 @@ fat_create_partition:
|
||||
; FAT size requires knowledge of some calculated values, which are also used
|
||||
; in the normal operation, let's hope for the best and allocate data now; if
|
||||
; it will prove wrong, just deallocate it.
|
||||
push ebx
|
||||
movi eax, sizeof.FAT
|
||||
call malloc
|
||||
pop ebx
|
||||
test eax, eax
|
||||
jz .return0
|
||||
mov ecx, [ebp+8]
|
||||
|
Loading…
Reference in New Issue
Block a user