Author: Armin Rigo <[email protected]>
Branch: c7
Changeset: r642:65db74df8ff6
Date: 2014-01-18 16:48 +0100
http://bitbucket.org/pypy/stmgc/changeset/65db74df8ff6/

Log:    tweaks

diff --git a/c7/core.c b/c7/core.c
--- a/c7/core.c
+++ b/c7/core.c
@@ -19,7 +19,7 @@
 #define NB_PAGES            (256*256)    // 256MB
 #define NB_THREADS          2
 #define MAP_PAGES_FLAGS     (MAP_SHARED | MAP_ANONYMOUS | MAP_NORESERVE)
-#define LARGE_OBJECT_WORDS  36
+#define LARGE_OBJECT_WORDS  220  // XXX was 36
 #define NB_NURSERY_PAGES    1024
 #define LENGTH_SHADOW_STACK   163840
 
diff --git a/duhton/Makefile b/duhton/Makefile
--- a/duhton/Makefile
+++ b/duhton/Makefile
@@ -4,12 +4,15 @@
             ../c7/list.c \
             ../c7/reader_writer_lock.c
 
+C7HEADERS = ../c7/*.h
+
+
 all: duhton_debug duhton
 
-duhton: *.c *.h ../c4/*.c ../c4/*.h
+duhton: *.c *.h $(C7SOURCES) $(C7HEADERS)
        clang -pthread -g -O2 -o duhton *.c $(C7SOURCES) -Wall
 
-duhton_debug: *.c *.h ../c4/*.c ../c4/*.h
+duhton_debug: *.c *.h $(C7SOURCES) $(C7HEADERS)
        clang -pthread -g -DDu_DEBUG -o duhton_debug *.c $(C7SOURCES) -Wall
 
 clean:
diff --git a/duhton/duhton.c b/duhton/duhton.c
--- a/duhton/duhton.c
+++ b/duhton/duhton.c
@@ -1,7 +1,7 @@
 #include <string.h>
 #include "duhton.h"
 
-#define DEFAULT_NUM_THREADS 4
+#define DEFAULT_NUM_THREADS 2
 
 int main(int argc, char **argv)
 {
diff --git a/duhton/duhton.h b/duhton/duhton.h
--- a/duhton/duhton.h
+++ b/duhton/duhton.h
@@ -67,6 +67,8 @@
 
 extern DuType *Du_Types[_DUTYPE_TOTAL];
 
+#define ROUND_UP(size)  ((size) < 16 ? 16 : ((size) + 7) & ~7)
+
 
 DuObject *DuObject_New(DuType *tp);
 int DuObject_IsTrue(DuObject *ob);
diff --git a/duhton/object.c b/duhton/object.c
--- a/duhton/object.c
+++ b/duhton/object.c
@@ -23,7 +23,7 @@
     size_t result = tp->dt_size;
     if (result == 0)
         result = tp->dt_bytesize((struct DuObject_s *)obj);
-    return result;
+    return ROUND_UP(result);
 }
 
 /* callback: trace the content of an object */
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to