-
Notifications
You must be signed in to change notification settings - Fork 35
Allow to create a pool with NULL params #1409
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
base: main
Are you sure you want to change the base?
Conversation
d14149a
to
45c78ee
Compare
45c78ee
to
675f786
Compare
eba9ea7
to
2c04d26
Compare
fc88217
to
40739be
Compare
40d794c
to
5c028ae
Compare
src/pool/pool_disjoint.c
Outdated
umf_disjoint_pool_params_t default_params = { | ||
.slab_min_size = 64 * 1024, // 64KB default | ||
.max_poolable_size = 2 * 1024 * 1024, // 2MB default | ||
.capacity = 4, // default | ||
.min_bucket_size = 8, // default | ||
.cur_pool_size = 0, | ||
.pool_trace = 0, | ||
.shared_limits = NULL, | ||
.name = "disjoint"}; | ||
if (!params) { | ||
dp_params = &default_params; | ||
} else { | ||
dp_params = params; |
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.
you should just create params structure with default values. Now we have default values in two places, so if we change default we must remember to change them here too
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.
5c028ae
to
e9d89b6
Compare
Description
Checklist