[pypy-commit] pypy stmgc-c7: fix

arigo noreply at buildbot.pypy.org
Sun Apr 6 12:50:05 CEST 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r70475:8929b1e5751d
Date: 2014-04-06 12:22 +0200
http://bitbucket.org/pypy/pypy/changeset/8929b1e5751d/

Log:	fix

diff --git a/rpython/translator/c/src/mem.c b/rpython/translator/c/src/mem.c
--- a/rpython/translator/c/src/mem.c
+++ b/rpython/translator/c/src/mem.c
@@ -92,6 +92,7 @@
 {
   long count = 0;
   struct pypy_debug_alloc_s *p;
+  spinlock_acquire(pypy_debug_alloc_lock, 'R');
   for (p = pypy_debug_alloc_list; p; p = p->next)
     count++;
   if (count > 0)
@@ -107,6 +108,7 @@
       else
         fprintf(stderr, " (use PYPY_ALLOC=1 to see the list)\n");
     }
+  spinlock_release(pypy_debug_alloc_lock);
 }
 
 #endif /* RPY_ASSERT */


More information about the pypy-commit mailing list