aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/testlib.h
diff options
context:
space:
mode:
authorRichard Kistruck2010-03-22 23:00:42 +0000
committerRichard Kistruck2010-03-22 23:00:42 +0000
commit1ff022cae16e98ff565fbfd76b14bd892418e653 (patch)
tree91f2ff05d1c9517dde22486e1195c0feab8d1122 /mps/code/testlib.h
parent968eafea906c60658f5c412935e9352a645ca2fa (diff)
downloademacs-1ff022cae16e98ff565fbfd76b14bd892418e653.tar.gz
emacs-1ff022cae16e98ff565fbfd76b14bd892418e653.zip
mps br/vmem: simple-chunk-return:
zcoll.c: How to get rid of all the objects, so full collect really collects all automatic objects: - Rootdrop() helps, but we can still retain a 1.2MB object; - stackwipe() does not help much -- these unwanted ambig refs are being left on the stack by MPS code that runs between mps_arena_collect and the flip! - therefore StackScan(0/1) to destroy stack+reg root before full collect: it's the only way to be sure. Reproducibility: - give Make() a random? switch, acted on by df() = diversity function, to allow bypass of rnd(); - ZRndStateSet, to set the seed for rnd() Output: - print_M: switchable Mebibytes or Megabytes (more useful, to be honest); - get(): don't report message times, it messes up diffs. testlib.c/h: Reproducibility: - fix rnd_state so a rnd_state getter is possible; - testlib.h += rnd_state_t, rnd_state(), rnd_state_set(), rnd_state_set_v2() trace.c: traceFindGrey diag: no newline please Copied from Perforce Change: 170093 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/testlib.h')
-rw-r--r--mps/code/testlib.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/mps/code/testlib.h b/mps/code/testlib.h
index cf40053c2d3..2a70fa81f58 100644
--- a/mps/code/testlib.h
+++ b/mps/code/testlib.h
@@ -138,10 +138,14 @@ extern void verror(const char *format, va_list args);
138 138
139/* rnd -- random number generator 139/* rnd -- random number generator
140 * 140 *
141 * rnd() generates a sequence of integers in the range [1, 2^31-1]. 141 * rnd() generates a sequence of integers in the range [1, 2^31-2].
142 */ 142 */
143 143
144extern unsigned long rnd(void); 144extern unsigned long rnd(void);
145typedef unsigned long rnd_state_t;
146extern rnd_state_t rnd_state(void);
147extern void rnd_state_set(rnd_state_t state_v3);
148extern void rnd_state_set_v2(rnd_state_t seed0_v2); /* legacy */
145 149
146 150
147/* rnd_verify() -- checks behaviour of rnd() */ 151/* rnd_verify() -- checks behaviour of rnd() */