Author: Armin Rigo <[email protected]>
Branch:
Changeset: r1202:dcea4c839318
Date: 2014-05-08 15:00 +0200
http://bitbucket.org/pypy/stmgc/changeset/dcea4c839318/
Log: Small fix. Without this, the first 255 transaction's read markers
are written in the shared mmap, but then we mount a private zero
mmap for every 255 transactions. It means the initial 255
transaction's read markers stay around in memory (I think), even if
they are never accessed any more.
diff --git a/c7/stm/setup.c b/c7/stm/setup.c
--- a/c7/stm/setup.c
+++ b/c7/stm/setup.c
@@ -86,15 +86,16 @@
pr->callbacks_on_abort = tree_create();
pr->overflow_number = GCFLAG_OVERFLOW_NUMBER_bit0 * i;
highest_overflow_number = pr->overflow_number;
+ pr->pub.transaction_read_version = 0xff;
}
/* The pages are shared lazily, as remap_file_pages() takes a relatively
long time for each page.
- The read markers are initially zero, which is correct:
- STM_SEGMENT->transaction_read_version never contains zero,
- so a null read marker means "not read" whatever the
- current transaction_read_version is.
+ The read markers are initially zero, but we set anyway
+ transaction_read_version to 0xff in order to force the first
+ transaction to "clear" the read markers by mapping a different,
+ private range of addresses.
*/
setup_sync();
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit