projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
99836ac
)
fix ASSERT_SPARK_POOL_INVARIANTS(): top>bottom is valid
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 6 Nov 2008 15:58:26 +0000
(15:58 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 6 Nov 2008 15:58:26 +0000
(15:58 +0000)
rts/Sparks.h
patch
|
blob
|
history
diff --git
a/rts/Sparks.h
b/rts/Sparks.h
index
9696889
..
f24ccca
100644
(file)
--- a/
rts/Sparks.h
+++ b/
rts/Sparks.h
@@
-51,17
+51,19
@@
typedef struct SparkPool_ {
} SparkPool;
} SparkPool;
-/* INVARIANTS, in this order: bottom/top consistent, reasonable size,
+/* INVARIANTS, in this order: reasonable size,
topBound consistent, space pointer, space accessible to us */
#define ASSERT_SPARK_POOL_INVARIANTS(p) \
topBound consistent, space pointer, space accessible to us */
#define ASSERT_SPARK_POOL_INVARIANTS(p) \
- ASSERT((p)->bottom >= (p)->top); \
ASSERT((p)->size > 0); \
ASSERT((p)->size > 0); \
- ASSERT((p)->size > (p)->bottom - (p)->top); \
ASSERT((p)->topBound <= (p)->top); \
ASSERT((p)->elements != NULL); \
ASSERT(*((p)->elements) || 1); \
ASSERT(*((p)->elements - 1 + ((p)->size)) || 1);
ASSERT((p)->topBound <= (p)->top); \
ASSERT((p)->elements != NULL); \
ASSERT(*((p)->elements) || 1); \
ASSERT(*((p)->elements - 1 + ((p)->size)) || 1);
+// No: it is possible that top > bottom when using reclaimSpark()
+// ASSERT((p)->bottom >= (p)->top);
+// ASSERT((p)->size > (p)->bottom - (p)->top);
+
// Initialisation
void initSparkPools (void);
// Initialisation
void initSparkPools (void);