[space map] fix accounting of allocatable blocks (#98)
Preserve the input block first to avoid reusing it in subsequent shadow operations, e.g., shadow another block when releasing a recursive lock. (issue #97)
This commit is contained in:
parent
6a7351da0d
commit
4b08c7793d
@ -68,10 +68,10 @@ namespace {
|
||||
}
|
||||
|
||||
virtual void dec(block_address b) {
|
||||
sm_->dec(b);
|
||||
|
||||
if (!sm_->get_count(b))
|
||||
if (sm_->get_count(b) == 1)
|
||||
mark_freed(b);
|
||||
|
||||
sm_->dec(b);
|
||||
}
|
||||
|
||||
virtual maybe_block find_free(span_iterator &it) {
|
||||
|
Loading…
Reference in New Issue
Block a user