On 01/26/2011 09:19 PM, Richard Henderson wrote:
On 01/26/2011 12:17 PM, Lluís wrote:
Richard Henderson writes:

On 01/26/2011 03:07 AM, Stefano Bonifazi wrote:
P.S. Please just answer that last question, whether it is possible to
have a variable showing the upper bound of heap (some brk_end) for a
target process
No, the heap grows until it reaches some other memory mapped entity.
> From man brk(2) :

      "sbrk() increments the program's data space by increment bytes.
       Calling sbrk() with an increment of 0 can be used to find the
       current location of the program break."

I already sent this to the list in a previous mail, but it seems you
overlooked it as you were not an explicit recipient.
That's the current top of the heap.  I answered the question as if
it was asking for the maximum top of the heap.


r~
Yup!
I am concerned what can be the highest address used as heap by a target binary, because I am creating multiple instances of qemu-user, and I wanna prevent the target process images and heaps to overlap.. Good enough to know the mmu will stop giving memory when meeting another memory mapped region.. Moreover I think I'd have to call sbrk from within the target binary for resizing its heap, whereas I wanna control it from qemu-user that is loading, then translating and executing it.. @Luis: Yup sorry for not answering the previous post of yours, I thought I'd receive emails always when somebody answered a post I created at the beginning!

Thank you!
Regards,
Stefano B.

Reply via email to