-
Notifications
You must be signed in to change notification settings - Fork 22
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
update the example of custom memory allocator #249
Conversation
518ea65
to
8d3c421
Compare
return; | ||
vsag::Options::Instance().logger()->Debug("deallocate " + std::to_string(sizes_[p]) + | ||
" bytes."); | ||
sizes_.erase(p); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: reduce dup find cost
auto iter = sizes_.find(p);
if (iter == sizes_.end() {
return;
}
sizes_.erase(iter);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
8d3c421
to
e4c8de1
Compare
Signed-off-by: wxy407827 <[email protected]>
e4c8de1
to
e803026
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.