[pypy-svn] r76569 - in pypy/branch/memrecord/pypy: rpython/lltypesystem translator/c/src

arigo at codespeak.net arigo at codespeak.net
Tue Aug 10 16:48:40 CEST 2010


Author: arigo
Date: Tue Aug 10 16:48:39 2010
New Revision: 76569

Modified:
   pypy/branch/memrecord/pypy/rpython/lltypesystem/llarena.py
   pypy/branch/memrecord/pypy/translator/c/src/debug_memrecord.h
Log:
Also record the memclears done during GC.


Modified: pypy/branch/memrecord/pypy/rpython/lltypesystem/llarena.py
==============================================================================
--- pypy/branch/memrecord/pypy/rpython/lltypesystem/llarena.py	(original)
+++ pypy/branch/memrecord/pypy/rpython/lltypesystem/llarena.py	Tue Aug 10 16:48:39 2010
@@ -447,6 +447,9 @@
     clear_large_memory_chunk = llmemory.raw_memclear
 
 
+clear_large_memory_chunk = llmemory.raw_memclear      # XXXXXX
+
+
 def llimpl_arena_malloc(nbytes, zero):
     addr = llmemory.raw_malloc(nbytes)
     if zero and bool(addr):

Modified: pypy/branch/memrecord/pypy/translator/c/src/debug_memrecord.h
==============================================================================
--- pypy/branch/memrecord/pypy/translator/c/src/debug_memrecord.h	(original)
+++ pypy/branch/memrecord/pypy/translator/c/src/debug_memrecord.h	Tue Aug 10 16:48:39 2010
@@ -24,6 +24,11 @@
   DEBUG_MEMREC(posid, &(targetexpr), targetexpr, newvalue);     \
   targetexpr = newvalue
 
+#undef OP_RAW_MEMCLEAR
+#define OP_RAW_MEMCLEAR(p, size, r)                     \
+  memset((void*)p, 0, size);                            \
+  DEBUG_MEMREC(0, (void*)p, (void*)size, (void*)0)
+
 /************************************************************/
 
 #ifndef PYPY_NOT_MAIN_FILE



More information about the Pypy-commit mailing list