How to findo information about the current address space?

1 post
by Makogan » Wed Jun 14, 2017 1:37 am
So! I am about to implement malloc (scary!) for the pi 3. But in order to do this I need to know mainly 2 things, the first what is the TRUE maximum ram address that is addressable by the cpu. I have heard that pi's have a limit of 1 gb, so I assume the last ram address is located at: 1073741824-1 = 1073741823, am I correct in this?

The other thing is, although i can easily check for the size of my kernel (i.e the only program running at the time) by disassembling and seeing where the las address lies, this seems tedious. Is there a way to tell exactly where my program lives in memory at run time (or at the bare minimum at linking time?). My only hypothesis is to iterate through all of ram starting at 0x8000 looking for the first 0, but I cannot fit all the possible problems with this into 1 post.

Thank you and sorry for the bother once again.
Posts: 67
Joined: Tue May 16, 2017 9:17 pm