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

Re: [MiNT] Freeing child's base page



 
If I'm not wrong, for one process there are 2 Malloc() blocks:
- The process environment block
- The TPA block: basepage+text+data+bss+stack

So if you call Mfree() with the pointer to the basepage, you actually free the whole TPA block, so the data becomes invalid.

Am I wrong ?
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. This is why I ask how it's with termination of that proc2 -- if it's removed from memory (then it would make sense and it's just coincidence memory violation occurs after Mfree() call) or there's something else.

--
MiKRO / Mystic Bytes
http://mikro.atari.org