Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KFilipek
Copy link
Contributor

@KFilipek KFilipek commented Jul 3, 2025

Description

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly
  • CI workflows, not executed per PR (e.g. Nightly), execute properly
  • New tests added, especially if they will fail without my changes
  • Added/extended example(s) to cover this functionality
  • Extended the README/documentation
  • All newly added source files have a license
  • All newly added source files are referenced in CMake files
  • Logger (with debug/info/... messages) is used
  • All API changes are reflected in docs and def/map files, and are tested

@KFilipek KFilipek requested a review from a team as a code owner July 3, 2025 10:24
@KFilipek KFilipek self-assigned this Jul 3, 2025
@KFilipek KFilipek force-pushed the create_with_null branch from d14149a to 45c78ee Compare July 3, 2025 12:00
@KFilipek KFilipek requested review from lplewa and bratpiorka July 3, 2025 12:37
@KFilipek KFilipek force-pushed the create_with_null branch from 45c78ee to 675f786 Compare July 3, 2025 12:38
@KFilipek KFilipek force-pushed the create_with_null branch 2 times, most recently from eba9ea7 to 2c04d26 Compare July 3, 2025 13:52
@KFilipek KFilipek force-pushed the create_with_null branch 2 times, most recently from fc88217 to 40739be Compare July 3, 2025 15:00
@KFilipek KFilipek requested a review from lukaszstolarczuk July 3, 2025 15:01
@KFilipek KFilipek force-pushed the create_with_null branch 2 times, most recently from 40d794c to 5c028ae Compare July 4, 2025 09:13
Comment on lines 656 to 669
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;
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@KFilipek KFilipek force-pushed the create_with_null branch from 5c028ae to e9d89b6 Compare July 4, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants