Author: Armin Rigo <[email protected]>
Branch: c5
Changeset: r562:fec50fbe7690
Date: 2013-12-19 12:12 +0100
http://bitbucket.org/pypy/stmgc/changeset/fec50fbe7690/
Log: A completely new page doesn't need a version.
diff --git a/c5/core.c b/c5/core.c
--- a/c5/core.c
+++ b/c5/core.c
@@ -250,8 +250,8 @@
{
struct page_header_s *newpage = _stm_reserve_page();
newpage->modif_head = 0xff;
- newpage->kind = i; /* object size in words */
- newpage->version = stm_local.transaction_version;
+ newpage->kind = i; /* object size in words */
+ newpage->version = 0; /* a completely new page doesn't need a version */
stm_local.alloc[i].next = ((char *)(newpage + 1)) + (i * 8);
stm_local.alloc[i].end = ((char *)newpage) + 4096;
assert(stm_local.alloc[i].next <= stm_local.alloc[i].end);
@@ -498,6 +498,7 @@
__sync_fetch_and_add(&d->next_transaction_version, 2u);
assert(stm_local.transaction_version <= 0xffff);
assert((stm_local.transaction_version & 1) == 0); /* EVEN number */
+ assert(stm_local.transaction_version >= 2);
struct write_history_s *cur = NULL;
if (stm_local.writes_by_this_transaction != NULL) {
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit