Skip to content

Conversation

KFilipek
Copy link
Contributor

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 self-assigned this Jul 25, 2025
@KFilipek KFilipek requested a review from a team as a code owner July 25, 2025 09:25
@bratpiorka bratpiorka marked this pull request as draft July 28, 2025 09:22
@KFilipek KFilipek force-pushed the post_initialize branch 17 times, most recently from 54df467 to 40c6dfc Compare August 1, 2025 08:46
@KFilipek KFilipek marked this pull request as ready for review August 1, 2025 10:14
@KFilipek KFilipek requested review from lplewa and bratpiorka August 1, 2025 10:15
Comment on lines 171 to 176
/// @param provider memory provider that will be used for coarse-grain allocations.
/// Should contain at least one memory provider.
/// @param numProvider number of elements in the providers array
/// @param params pool-specific params, or NULL for defaults
/// @param pool [out] returns pointer to the pool
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
Copy link
Contributor

Choose a reason for hiding this comment

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

Write better documentation

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.

void *provider) {
(void)params;
(void)provider;
// For initial version, just return success
Copy link
Contributor

Choose a reason for hiding this comment

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

since this is ext function, can't we just omit it, when not needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 - this would be replaced by "default" handler during provider creation

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 post_initialize branch 2 times, most recently from a5f6195 to 7aca774 Compare August 4, 2025 11:53
void *provider) {
(void)params;
(void)provider;
// For initial version, just return success
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 - this would be replaced by "default" handler during provider creation

@KFilipek KFilipek force-pushed the post_initialize branch 7 times, most recently from 172429a to 1fcad79 Compare August 5, 2025 17:19
/// \details
/// * This function *must* be implemented if the pool/provider supports CTL that overrides defaults.
/// * This function *must* free any resources allocated in the function.
/// * This function *must* be called after the memory pool has been allocated in initialize function
Copy link
Contributor

Choose a reason for hiding this comment

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

This function *must* be called after the memory pool has been allocated in initialize function

Must be called by whom? If UMF calls it, then the comment is missleading.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's about the function order. Generally, this function is the same case as initialize(), it's also invoked in the same way - internally.

@KFilipek KFilipek force-pushed the post_initialize branch 10 times, most recently from eaab2b7 to a3ac32a Compare August 7, 2025 14:32
Split between initialize and post-initialize function is necessary
for properly handling CTL defaults.
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.

5 participants