The first function ("validateChunk") now makes sure that:
+
chunk + currentChunkSize >= currentChunk
+
+
when checking that the current chunk doesn't overlap with either the previous or next one.
+
+
+
The second function ("Kern::ControlMemory"), aside from other small changes, now makes additional checks on the previously allocated memory chunk; the code for that is now: