summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2010-03-17 00:36:00 +0100
committerJohannes Weiner <hannes@cmpxchg.org>2010-03-17 00:37:08 +0100
commitcad0e55d8f86132e954700be7f0fd4656f2e8fa1 (patch)
tree98309bb2bfbf9351816af333ced34d015647ccbc
parentd32f8cea92e73556ec804a0ccc50355bf1691029 (diff)
gc: do not unmark while collecting
Before each scan, a full unmarking cycle is followed by a full marking cycle. There is no need to reset marks while scanning. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
-rw-r--r--sheep/gc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sheep/gc.c b/sheep/gc.c
index 6f0f376..54a0884 100644
--- a/sheep/gc.c
+++ b/sheep/gc.c
@@ -83,10 +83,8 @@ static unsigned int collect_pool(struct sheep_vm *vm,
for (i = moved = 0; i < POOL_SIZE; i++) {
struct sheep_object *sheep = &pool->mem[i];
- if (sheep->data & 1) {
- sheep->data &= ~1;
+ if (sheep->data & 1)
continue;
- }
if (sheep->type->free)
sheep->type->free(vm, sheep);