mmtk / mmtk-core

Memory Management ToolKit
https://www.mmtk.io
Other
379 stars 69 forks source link

`ChunkMap` is broken when using multiple spaces that access it #1197

Open k-sareen opened 2 months ago

k-sareen commented 2 months ago

tl;dr ChunkMap encodes global state (whether a chunk has been allocated or not) but is used as if it's a local metadata which can cause issues when using multiple spaces that access it such as ImmixSpace and MarkSweepSpace.

For more context see here: https://mmtk.zulipchat.com/#narrow/stream/262673-mmtk-core/topic/.60ChunkMap.60.20with.20ImmixSpace.20and.20MarkSweepSpace

k-sareen commented 2 months ago

See https://github.com/k-sareen/mmtk-core/commit/9ae493600e30e53833d05301bf1bc50807b51e7e for my (ugly) solution to this.