Skip to content

线段树分配器代码问题 #137

@NaviVoid

Description

@NaviVoid

os/src/algorithm/src/allocator/segment_tree_allocator.rs

SegmentTreeAllocator::new

在线段树分配器里的new方法里面,分配给tree的大小是

let mut tree = vec![0u8; 2 * leaf_count];

看之后的代码感觉是用每个bit位做节点,所以想问问这里是不是忘了除以8

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions