Author: Remi Meier <[email protected]>
Branch: c8-faster-smallobj-sync
Changeset: r1933:2f5c2406cf18
Date: 2015-08-11 14:51 +0200
http://bitbucket.org/pypy/stmgc/changeset/2f5c2406cf18/
Log: fix for wrong assumption
diff --git a/c8/stm/core.c b/c8/stm/core.c
--- a/c8/stm/core.c
+++ b/c8/stm/core.c
@@ -1821,12 +1821,10 @@
ssize_t size = (ssize_t)lst->items[i+1];
if (start + size == obj_start) {
- /* merge!
- Note: we cannot overlap pages by adding to a range
- in this way, since the first slot in a smallmalloc
- page is always unused. Thus, we never merge the
- last obj in a page with the first obj in a successor
- page. */
+ /* merge! */
+ if ((size + obj_size) + ((uintptr_t)start & 4095) > 4096)
+ break; /* doesn't fit inside the same page */
+
lst->items[i+1] = size + obj_size;
return;
}
diff --git a/c8/stm/core.h b/c8/stm/core.h
--- a/c8/stm/core.h
+++ b/c8/stm/core.h
@@ -113,6 +113,8 @@
pages) */
/* XXX: not much different from before. Maybe try a ranges list
per size class. */
+ /* XXX: also, we could sweep these ranges on abort and thereby
+ free these overflow objs early */
struct list_s *small_overflow_obj_ranges;
uint8_t privatization_lock; // XXX KILL
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit