From mint-bounce@lists.fishpool.fi Wed Jan 27 17:36:23 2010 X-SourceIP: 77.249.76.7 Message-ID: <4B60BF25.3030305@chello.nl> Date: Wed, 27 Jan 2010 23:33:09 +0100 From: Henk Robbers User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: mint@lists.fishpool.fi Subject: Re: [MiNT] Freeing child's base page References: <1F55D94972D147B8A69EF89653073145@mercatus.local> <95937FACD324407D816DAEF5157D0B90@mercatus.local> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: h.robbers@chello.nl Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Miro Kropacek wrote: Mfree( ldg->baspag); ldg->baspag = NULL; > > Funny thing is the memory violation does _not_ occur when Mfree (bp) is > commented out, that's the point why I'm so curious what's happening here, if > it's only some coincidence / undefined behavior or something else. > Could ldg and ldg->baspag happen to point to the same Malloc area? Is the ldg structure made part of the tpa somehow and ldg->baspag points to that tpa? Freeing that tpa then also invalidates ldg. Just some idees. -- Groeten; Regards. Henk Robbers. http://members.chello.nl/h.robbers Interactive disassembler: TT-Digger; http://digger.atari.org A Home Cooked C compiler: AHCC; http://ahcc.atari.org