Subversion Repositories Kolibri OS

Rev

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

Rev 3626 Rev 3725
Line 347... Line 347...
347
        xor     eax, eax        ; the argument of malloc() is in eax
347
        xor     eax, eax        ; the argument of malloc() is in eax
348
@@:
348
@@:
349
        inc     eax
349
        inc     eax
350
        cmp     byte [ebx+eax-1], 0
350
        cmp     byte [ebx+eax-1], 0
351
        jnz     @b
351
        jnz     @b
352
; 2b. Call the heap manager. Note that it can change ebx.
352
; 2b. Call the heap manager.
353
        push    ebx
-
 
354
        call    malloc
353
        call    malloc
355
        pop     ebx
-
 
356
; 2c. Check the result. If allocation failed, go to 7.
354
; 2c. Check the result. If allocation failed, go to 7.
357
        pop     esi             ; restore allocated pointer to DISK
355
        pop     esi             ; restore allocated pointer to DISK
358
        test    eax, eax
356
        test    eax, eax
359
        jz      .free
357
        jz      .free
360
; 2d. Store the allocated pointer to the DISK structure.
358
; 2d. Store the allocated pointer to the DISK structure.