Expose winapi heap debugging tools to lua
_msize returns the real allocation size of a pointer by using windows heap black magic. This function is significantly more useful than the equivalent on linux (which seems to have no equivalent), which only returns the block size - and so cannot really be used for what we need it for. Eg running it on a unit pointer returns 5136 , whereas on linux it'd probably return something much more block-sized
This would have detected more than one misalignment as well (aliased pointers) and is how I found that vision_cone was misaligned, and would very likely be useful to integrate into gm-edit
I don't have a wine install, but its absolutely worth checking the behaviour there, as this is one of the things that will likely diverge
Edit:
This PR now contains a reasonably complete set of tools for debugging the heap. I'm going to file a PR to update sizecheck for both dangling pointers (which can now detect the zone bug!), and memory misalignments