Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NaviVoid opened this issue Feb 24, 2021 · 0 comments
Open

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

NaviVoid opened this issue Feb 24, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@NaviVoid
Copy link

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

SegmentTreeAllocator::new

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

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

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

@NaviVoid NaviVoid added the bug Something isn't working label Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants