flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Endre
You have an excellent example: Take a look into the source of fasm. You will find it.
|
|||
![]() |
|
Tomasz Grysztar
It's syscall 45, called sys_brk, which resizes the memory block allocated for your program (the program resides on the bottom of this block, and with sys_brk you just move the top of it).
|
|||
![]() |
|
Dryobates
sys_brk is old style. Now it's preffered sys_mmap with anon mapping.
|
|||
![]() |
|
Tomasz Grysztar
However brk syscall is common for the Linux and all BSD systems (I'm not sure about BeOS), so I preferred it.
|
|||
![]() |
|
Ton
Thanks for the pointers. Iĺl give it a try.
-- Ton |
|||
![]() |
|
scientica
there's also malloc and free in linux
![]() try: man 3 malloc |
|||
![]() |
|
Dryobates
scientica wrote: there's also malloc and free in linux But then he need link with libc... |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.