summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-01-14 22:19:14 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2008-01-14 22:19:14 (GMT)
commit18284e8f5c54510ee02d5a3513b79aa687f9ed6f (patch)
treeac146027356717997c9f00c806d908ac2a4da6d1
parentf3f7cb2bef0c949f7938c609a1bcdfeb7ad5631c (diff)
downloadlpsm-18284e8f5c54510ee02d5a3513b79aa687f9ed6f.zip
lpsm-18284e8f5c54510ee02d5a3513b79aa687f9ed6f.tar.gz
lpsm-18284e8f5c54510ee02d5a3513b79aa687f9ed6f.tar.bz2
lpsm-18284e8f5c54510ee02d5a3513b79aa687f9ed6f.tar.xz
testalloc.c: make debugging a bit easier
Make debugging a bit easier by having a global event number which can be used for breakpointing.
-rw-r--r--testalloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/testalloc.c b/testalloc.c
index e0dd357..3cccd26 100644
--- a/testalloc.c
+++ b/testalloc.c
@@ -47,6 +47,9 @@ void verify_no_overlap(int slot)
}
}
+/* Volatile to make sure it's readily available to the debugger */
+volatile int sequence = 0;
+
int main(int argc, char *argv[])
{
int i, slot, newsize;
@@ -72,6 +75,8 @@ int main(int argc, char *argv[])
lpsm_checkpoint(0.0, PSMSYNC_WAIT);
for ( i = 0 ; i < COUNT ; i++ ) {
+ printf("Sequence number: %d\n", ++sequence);
+
slot = rand() % SLOTS;
if ( areas[slot] ) {