Add new API to copy managed memory.
commit0d23401c8a8bd47714a803b40f71205a8ff7fffc
authorRodrigo Kumpera <kumpera@gmail.com>
Wed, 18 May 2011 19:04:24 +0000 (18 16:04 -0300)
committerRodrigo Kumpera <kumpera@gmail.com>
Thu, 19 May 2011 19:43:35 +0000 (19 16:43 -0300)
tree4dcee5f1619be2c9239b32fad7d840d3fff90ba3
parente582b1ecf27613a747d436b12748fc7ad80d0e7d
Add new API to copy managed memory.

* gc.c: Add mono_gc_bzero and mono_gc_memmove. Those
functions do word sized load/stores so they are GC safe.

Those oddly seeing functions are required as libc equivalents
don't ensure that copies and done at least in word granularity
so we can end up pausing a thread while is has, for example,
zeroed just the first byte of a managed reference, causing the
GC to see an invalid pointer.

This happens on OSX but can potentially happen on other systems.
mono/metadata/gc-internal.h
mono/metadata/gc.c