Don't use libc malloc/free from assembler code.
This commit is contained in:
parent
e5ad82ffd5
commit
2a4cfff503
@ -250,4 +250,5 @@ extern uint32_t *kos_lfb_base;
|
||||
extern uint16_t *kos_win_stack;
|
||||
extern uint16_t *kos_win_pos;
|
||||
extern disk_t disk_list;
|
||||
|
||||
#endif
|
||||
|
14
umka.asm
14
umka.asm
@ -3,9 +3,6 @@ format ELF
|
||||
__DEBUG__ = 1
|
||||
__DEBUG_LEVEL__ = 1
|
||||
|
||||
extrn 'malloc' as libc_malloc
|
||||
extrn 'free' as libc_free
|
||||
|
||||
public disk_add
|
||||
public disk_del
|
||||
public disk_list
|
||||
@ -273,21 +270,10 @@ endp
|
||||
|
||||
proc alloc_page
|
||||
ret
|
||||
push ecx edx
|
||||
mov eax, 0x1000
|
||||
ccall libc_malloc
|
||||
pop edx ecx
|
||||
ret
|
||||
endp
|
||||
|
||||
proc alloc_pages _cnt
|
||||
ret
|
||||
push ecx edx
|
||||
mov eax, [_cnt]
|
||||
shl eax, 12
|
||||
ccall libc_malloc
|
||||
pop edx ecx
|
||||
ret
|
||||
endp
|
||||
|
||||
proc sys_msg_board
|
||||
|
Loading…
Reference in New Issue
Block a user