[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Freeing child's base page



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