-
Notifications
You must be signed in to change notification settings - Fork 35
implement malloc_usable_size and enable pool tests for disjoint #1132
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
implement malloc_usable_size and enable pool tests for disjoint #1132
Conversation
src/pool/pool_disjoint.c
Outdated
slab_t *slab = | ||
(slab_t *)critnib_find_le(disjoint_pool->known_slabs, (uintptr_t)ptr); | ||
if (slab == NULL || ptr >= slab_get_end(slab)) { | ||
// regular free |
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.
I think comment is incorrect because of copy-n-paste
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
943545a
to
585547e
Compare
71d089d
to
7d5a238
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.
Please add tests with allocations done with umfPoolAlignedMalloc().
In almost sure that in the case when we used some "usable" memory to align ptr, you must substract it from "bucket size".
7d5a238
to
cbdd3ac
Compare
done. |
7cc6fdc
to
c2f9d5d
Compare
f90922b
to
249c364
Compare
Description
Implement malloc_usable_size and enable pool tests for disjoint.
Checklist