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

Re: [MiNT] Freeing child's base page



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