-
Notifications
You must be signed in to change notification settings - Fork 35
Use base allocator in memory pool, provider, target and memspace #184
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
Use base allocator in memory pool, provider, target and memspace #184
Conversation
cf2bf0c
to
a1670bd
Compare
a1670bd
to
31f3db7
Compare
9d07d72
to
f53288e
Compare
I will squash the commits when it is approved. |
src/memory_pool_default.c
Outdated
|
||
assert(sizeof(umf_memory_pool_t) < SIZE_BA_POOL_CHUNK); | ||
|
||
umf_memory_pool_handle_t pool = umf_ba_alloc(BA_pool); |
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.
How many base allocators will we have after merging this PR? Single? If so we could change this function to accept zero arguments and make it use BA_pool internally.
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
@ldorau @bratpiorka please see: #203 With those changes we can just use umf__ba_alloc(size) whenever needed and there is no need to create additional pools manually. |
e81f370
to
ac9591b
Compare
// saved pointer to the global base allocator | ||
umf_ba_pool_t *base_allocator; | ||
|
||
// saved pointer to the memspace linear base allocator |
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 you could write here "TODO this is a private copy of linear allocator - optimize this"
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.
Removed.
Done.
ac9591b
to
c85b936
Compare
Signed-off-by: Lukasz Dorau <[email protected]>
c85b936
to
7beb87a
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.
👍
@igchor review again, please |
No description provided.