From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45376 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiBpa-0005l0-K7 for qemu-devel@nongnu.org; Wed, 26 Jan 2011 15:19:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiBpZ-0007jB-NM for qemu-devel@nongnu.org; Wed, 26 Jan 2011 15:19:06 -0500 Received: from a.mail.sonic.net ([64.142.16.245]:38548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PiBpZ-0007iz-D1 for qemu-devel@nongnu.org; Wed, 26 Jan 2011 15:19:05 -0500 Message-ID: <4D4081B5.3090909@twiddle.net> Date: Wed, 26 Jan 2011 12:19:01 -0800 From: Richard Henderson MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu-user: relocating target code weakness References: <4D3D63B3.1030402@gmail.com> <4D3DD713.10405@twiddle.net> <4D3DF2A9.3080609@gmail.com> <4D3E292E.9090001@twiddle.net> <4D400080.7080501@gmail.com> <4D404002.1030601@twiddle.net> <87k4hrju7v.fsf@ginnungagap.bsc.es> In-Reply-To: <87k4hrju7v.fsf@ginnungagap.bsc.es> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Bonifazi , QEMU Developers On 01/26/2011 12:17 PM, Llu=C3=ADs wrote: > Richard Henderson writes: >=20 >> 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 >=20 >> No, the heap grows until it reaches some other memory mapped entity. >=20 >>>From man brk(2) : >=20 > "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." >=20 > 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~