[MLton-commit] r7462
Matthew Fluet
fluet at mlton.org
Thu May 13 05:48:40 PDT 2010
All remaining uses of memcpy are valid.
Audited remaining uses of memcpy in garbage collector. All are
certain to have non-overlapping source and destinations (e.g., nursery
to old-gen, one semi-space to another semi-space, one object to a
newly allocated object). Furthermore, the (src == dst) check in
GC_memcpy is unnecessary.
----------------------------------------------------------------------
U mlton/trunk/runtime/gc/virtual-memory.c
----------------------------------------------------------------------
Modified: mlton/trunk/runtime/gc/virtual-memory.c
===================================================================
--- mlton/trunk/runtime/gc/virtual-memory.c 2010-05-13 12:48:35 UTC (rev 7461)
+++ mlton/trunk/runtime/gc/virtual-memory.c 2010-05-13 12:48:39 UTC (rev 7462)
@@ -26,8 +26,6 @@
assert (isAligned ((size_t)src, sizeof(unsigned int)));
assert (isAligned ((size_t)dst, sizeof(unsigned int)));
assert (isAligned (size, sizeof(unsigned int)));
- if (src == dst)
- return;
assert (! (src <= dst and dst < src + size));
assert (! (dst <= src and src < dst + size));
memcpy (dst, src, size);
More information about the MLton-commit
mailing list