Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allocate heap memory in 64-bit assembler

Tags:

assembly

I was wondering if any one could explain in relatively simple terms, how to allocate heap memory?

I'm using x64 assembler (intel syntax) on a Linux machine. Up until now I have relied on making a call to the C function malloc, but I'm interest in the proper way.

like image 635
tinyhippo Avatar asked Oct 28 '25 03:10

tinyhippo


1 Answers

There are syscall lists available online that give you parameters to call directly (instead of the C function). Example list: http://blog.rchapman.org/post/36801038863/linux-system-call-table-for-x86-64 Example usage: http://callumscode.com/blog/3

like image 120
Brian Knoblauch Avatar answered Oct 29 '25 19:10

Brian Knoblauch