Author: Armin Rigo <ar...@tunes.org> Branch: stm-gc Changeset: r54483:91ef9bbd969f Date: 2012-04-17 19:23 +0200 http://bitbucket.org/pypy/pypy/changeset/91ef9bbd969f/
Log: Fixes diff --git a/pypy/translator/c/src/allocator.h b/pypy/translator/c/src/allocator.h --- a/pypy/translator/c/src/allocator.h +++ b/pypy/translator/c/src/allocator.h @@ -1,7 +1,12 @@ -#if defined(RPY_STM) +#if defined(RPY_STM) && defined(RPY_STM_ASSERT) +# define TRIVIAL_MALLOC_DEBUG +#endif -/* XXX no special malloc function, use the thread-safe system-provided one */ +#if defined(NO_OBMALLOC) || (defined(RPY_STM)&&!defined(TRIVIAL_MALLOC_DEBUG)) + + +/* no special malloc function, use the thread-safe system-provided one */ #define PyObject_Malloc malloc #define PyObject_Realloc realloc #define PyObject_Free free @@ -26,11 +31,6 @@ #elif defined(LINUXMEMCHK) # include "linuxmemchk.c" -#elif defined(NO_OBMALLOC) - void *PyObject_Malloc(size_t n) { return malloc(n); } - void *PyObject_Realloc(void *p, size_t n) { return realloc(p, n); } - void PyObject_Free(void *p) { free(p); } - #else # ifndef WITH_PYMALLOC # define WITH_PYMALLOC diff --git a/pypy/translator/stm/src_stm/et.c b/pypy/translator/stm/src_stm/et.c --- a/pypy/translator/stm/src_stm/et.c +++ b/pypy/translator/stm/src_stm/et.c @@ -665,7 +665,7 @@ jmp_buf _jmpbuf; volatile long v_counter = 0; long counter; - volatile void *saved_value; + void *volatile saved_value; assert(active_thread_descriptor == NULL); if (save_and_restore) saved_value = *(void**)save_and_restore; _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit