I’m curious if the implementation of UnsafeUtility.MemMove is guaranteed on every platform to support overlapping memory blocks. (like memmove in C).
My use case is quite unique, but I basically want to resize a container. Before resizing I need to move certain scattered data (from inside the container) to the front of the container.
I’d prefer if I could do this in-place without a temporary buffer.
This in-place memory moving could have sourcePtr being between desinationPtr and
destinationPtr+moveAmount. (which is what i mean with overlapping memory blocks).
I did a few tests on my windows pc in editor & it did support it. (sourcePtr==destinationPtr, sourcePtr inside destination memory block & destinationPtr inside source memory block)
But can I assume MemMove on every platform supports overlapping memory blocks?