summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-06-09 17:49:43 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-06-09 17:49:43 +0000
commit74ee9df9f9e79e7110e9d8541b84010f35c464c5 (patch)
treea7a10946773a1f12d367c063e4ac343e6580d9ad /includes
parent54fe7a440247fbd0f853d07da23d48b50a229a00 (diff)
downloadhaskell-74ee9df9f9e79e7110e9d8541b84010f35c464c5.tar.gz
Experimental "mark-region" strategy for the old generation
Sometimes better than the default copying, enabled by +RTS -w
Diffstat (limited to 'includes')
-rw-r--r--includes/Block.h7
-rw-r--r--includes/RtsFlags.h2
-rw-r--r--includes/Storage.h5
3 files changed, 11 insertions, 3 deletions
diff --git a/includes/Block.h b/includes/Block.h
index e2e691ab0e..3d7a5c8a86 100644
--- a/includes/Block.h
+++ b/includes/Block.h
@@ -84,12 +84,15 @@ typedef struct bdescr_ {
#define BF_LARGE 2
/* Block is pinned */
#define BF_PINNED 4
-/* Block is part of a compacted generation */
-#define BF_COMPACTED 8
+/* Block is to be marked, not copied */
+#define BF_MARKED 8
/* Block is free, and on the free list (TODO: is this used?) */
#define BF_FREE 16
/* Block is executable */
#define BF_EXEC 32
+/* Block contains only a small amount of live data */
+#define BF_FRAGMENTED 64
+
/* Finding the block descriptor for a given block -------------------------- */
diff --git a/includes/RtsFlags.h b/includes/RtsFlags.h
index 7d0b418aa1..11133efe1f 100644
--- a/includes/RtsFlags.h
+++ b/includes/RtsFlags.h
@@ -39,6 +39,8 @@ struct GC_FLAGS {
rtsBool compact; /* True <=> "compact all the time" */
double compactThreshold;
+ rtsBool sweep; /* use "mostly mark-sweep" instead of copying
+ * for the oldest generation */
rtsBool ringBell;
rtsBool frontpanel;
diff --git a/includes/Storage.h b/includes/Storage.h
index ae066c1c9e..34a5411918 100644
--- a/includes/Storage.h
+++ b/includes/Storage.h
@@ -55,7 +55,6 @@
typedef struct step_ {
unsigned int no; // step number in this generation
unsigned int abs_no; // absolute step number
- int is_compacted; // compact this step? (old gen only)
struct generation_ * gen; // generation this step belongs to
unsigned int gen_no; // generation number (cached)
@@ -87,8 +86,12 @@ typedef struct step_ {
// and scavenged_large_objects
#endif
+ int mark; // mark (not copy)? (old gen only)
+ int compact; // compact (not sweep)? (old gen only)
+
bdescr * old_blocks; // bdescr of first from-space block
unsigned int n_old_blocks; // number of blocks in from-space
+ unsigned int live_estimate; // for sweeping: estimate of live data
bdescr * todos; // blocks waiting to be scavenged
bdescr * todos_last;