From mint-bounce@lists.fishpool.fi Wed Jan 27 05:10:36 2010 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=pM9LtwkzvCsMc24HQi1JwKAKNVfey5yvpkAnq0hWafE=; b=q8iJOF2xW/r6cao1YynfGezRgt6KyD/7QyagUBeSn+OhjsmQ/DSJfIZrasrK+kr3+Y 4A1Ei/WpLwnyEUO6uce8s/afEzzcIBF5iCdH7NEVoKDkLFeXpw3GagpKW7FbMvLDaUZH 85AQa9Jc0xq7Ee4ZJgAa6b9USr5s8oUko3W9s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=OpsAo1cxeSt594iFqJj6bdT77kevdqniq0/zGfqlg+fRyEu0kVagVNBhKcTkdtFDq9 Of9OK1ORs+ihcl/toyx0wt/68gfSkpeo3ltTvTPG25CVXtSAe2AwIvZzv5SAfiZLEiws neh5pI7TIV1nmhmMDrrCjgeXP6IMNd0vb+pOs= Message-ID: <4B6010B7.70306@freesbee.fr> Date: Wed, 27 Jan 2010 11:08:55 +0100 From: =?ISO-8859-1?Q?Vincent_Rivi=E8re?= User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: mint@lists.fishpool.fi Subject: Re: [MiNT] Freeing child's base page References: <4B5F9E76.7070205@freesbee.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: vincent.riviere@freesbee.fr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Miro Kropacek wrote: > But remember, we're not doing something like FreeProcessMemory( > pointer_to_its_bp ); but just plain Mfree( pointer_to_its_bp ); So we > lose information where its data/text/bss segment is but I doubt we lose > also the data/text/bss segment *content* by this Mfree() call. You miss the fact that (basepage+text+data+bss+stack) is always a single contiguous memory block starting at the basepage. If you Mfree the basepage, you free the whole block starting from the basepage, including the global variables in the data and bss segment. However, it seems that MiNT handle special executable flags to share the text segment among several process, but I never tried them as this is a very specific case. -- Vincent Rivière