I don't even know if this compiles yet, but this is what I have so far.
There are two special circumstances that Reallocate needs to account for,
that being when the node that's gonna be used for the expanded memory is
right next to the node currently holding the data.  Those two then break
down into a few other cases that need accounting for, and that makes up the
bulk of the function.  My main concern is whether I accidentally did some
kind of pointer arithmetic on a void* that I didn't correct.  Besides that,
I'm fairly certain the code handles any possible situation.  The entire
MemoryManager still leaks little bits in certain cases, and that's next on
my list providing Reallocate works.

Z98

Attachment: MemoryManager.patch
Description: Binary data

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
SharpOS-Developers mailing list
SharpOS-Developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sharpos-developers

Reply via email to