[pypy-commit] stmgc default: Goes together with dacc33d175bf to make the crash more likely: a lower nursery size.
arigo
noreply at buildbot.pypy.org
Tue Mar 4 19:43:35 CET 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r950:72ebf183765d
Date: 2014-03-04 19:16 +0100
http://bitbucket.org/pypy/stmgc/changeset/72ebf183765d/
Log: Goes together with dacc33d175bf to make the crash more likely: a
lower nursery size.
diff --git a/c7/demo/Makefile b/c7/demo/Makefile
--- a/c7/demo/Makefile
+++ b/c7/demo/Makefile
@@ -20,12 +20,12 @@
# note that 'build' is optimized but still contains all asserts
debug-%: %.c ${H_FILES} ${C_FILES}
- clang -I.. -pthread -DSTM_DEBUGPRINT -g -O0 $< -o debug-$* \
- -Wall -Werror ../stmgc.c
+ clang -I.. -pthread -DSTM_DEBUGPRINT -DSTM_GC_NURSERY=128 -g -O0 \
+ $< -o debug-$* -Wall -Werror ../stmgc.c
build-%: %.c ${H_FILES} ${C_FILES}
- clang -I.. -pthread -g -O0 $< -o build-$* \
- -Wall -Werror ../stmgc.c
+ clang -I.. -pthread -DSTM_GC_NURSERY=128 -g -O0 \
+ $< -o build-$* -Wall -Werror ../stmgc.c
release-%: %.c ${H_FILES} ${C_FILES}
clang -I.. -pthread -g -DNDEBUG -O2 $< -o release-$* \
diff --git a/c7/stm/core.h b/c7/stm/core.h
--- a/c7/stm/core.h
+++ b/c7/stm/core.h
@@ -9,12 +9,16 @@
/************************************************************/
+#ifndef STM_GC_NURSERY
+# define STM_GC_NURSERY 4096 // 4MB
+#endif
+
#define NB_PAGES (1500*256) // 1500MB
#define NB_SEGMENTS 2
#define NB_SEGMENTS_MAX 240 /* don't increase NB_SEGMENTS past this */
#define MAP_PAGES_FLAGS (MAP_SHARED | MAP_ANONYMOUS | MAP_NORESERVE)
-#define NB_NURSERY_PAGES 1024 // 4MB
+#define NB_NURSERY_PAGES (STM_GC_NURSERY/4)
#define TOTAL_MEMORY (NB_PAGES * 4096UL * NB_SEGMENTS)
#define READMARKER_END ((NB_PAGES * 4096UL) >> 4)
diff --git a/c7/stm/setup.c b/c7/stm/setup.c
--- a/c7/stm/setup.c
+++ b/c7/stm/setup.c
@@ -18,6 +18,7 @@
assert((NB_PAGES * 4096UL) >> 8 <= (FIRST_OBJECT_PAGE * 4096UL) >> 4);
assert((END_NURSERY_PAGE * 4096UL) >> 8 <=
(FIRST_READMARKER_PAGE * 4096UL));
+ assert(_STM_FAST_ALLOC <= NB_NURSERY_PAGES * 4096);
stm_object_pages = mmap(NULL, TOTAL_MEMORY,
PROT_READ | PROT_WRITE,
More information about the pypy-commit
mailing list