because it uses the malloc from the standard library. In fact when I execute the following code:
printf("%p\n", sbrk(0));
printf("%p\n", sbrk(0));
I get:
0x804979c
0x804c000
Which means that when the 1st printf is executed the 'break' indicating the end of the heap is moved (I think).
User Profile
Collapse
-
printing an address with Write function
Hello,
So I'm trying to create a malloc function and want to print some addresses to check on them and be able to visualize a little what's going on but I can't use printf cause it messes around my process's heap which I don't want.
I was wondering how I could use the write function to print an address recovered from a pointer.
Thanks
No activity results to display
Show More
Leave a comment: