Skip to content

Use base allocator in critnib #178

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

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

ldorau
Copy link
Contributor

@ldorau ldorau commented Jan 26, 2024

@ldorau ldorau force-pushed the Use_base_allocator_in_critnib branch from 302d21f to 7a8b3c8 Compare January 26, 2024 10:47
@ldorau ldorau marked this pull request as ready for review January 26, 2024 13:26
@ldorau ldorau requested a review from a team as a code owner January 26, 2024 13:26
@ldorau ldorau requested review from bratpiorka and igchor January 26, 2024 13:30
Copy link
Contributor

@bratpiorka bratpiorka left a comment

Choose a reason for hiding this comment

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

others - please review as I'm on vacation

@bratpiorka bratpiorka self-requested a review January 29, 2024 08:51
@ldorau ldorau force-pushed the Use_base_allocator_in_critnib branch 2 times, most recently from e9106a5 to 4af17cc Compare January 29, 2024 11:57
@ldorau ldorau force-pushed the Use_base_allocator_in_critnib branch from 4af17cc to 5714aea Compare January 29, 2024 16:49
@ldorau ldorau requested a review from igchor January 29, 2024 17:02
Copy link
Contributor

@KFilipek KFilipek left a comment

Choose a reason for hiding this comment

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

Generally okay, but if the function umf_ba_linear_destroy needs an explanation every time that it also destroys the parent (the provider), it should have another name. If it's not the topic for this PR, please do it separately, I would be grateful.

@ldorau
Copy link
Contributor Author

ldorau commented Jan 31, 2024

Generally okay, but if the function umf_ba_linear_destroy needs an explanation every time that it also destroys the parent (the provider), it should have another name. If it's not the topic for this PR, please do it separately, I would be grateful.

@KFilipek

  1. It does NOT need an explanation every time - it is only my good will that I added those comments ;-) - I can remove them all.
  2. It does NOT destroy any parent. umf_ba_linear_destroy() only destroys a mutex and destroys a pool itself (unmaps a range of memory) - so what would be a better name? - see its implementation (ba_os_free() is a wrapper for munmap()):
void umf_ba_linear_destroy(umf_ba_linear_pool_t *pool) {
    util_mutex_destroy_not_free(&pool->metadata.lock);
    ba_os_free(pool, pool->metadata.pool_size);
}

@ldorau ldorau dismissed bratpiorka’s stale review January 31, 2024 07:03

All issues fixed

@KFilipek
Copy link
Contributor

Generally okay, but if the function umf_ba_linear_destroy needs an explanation every time that it also destroys the parent (the provider), it should have another name. If it's not the topic for this PR, please do it separately, I would be grateful.

@KFilipek

  1. It does NOT need an explanation every time - it is only my good will that I added those comments ;-) - I can remove them all.
  2. It does NOT destroy any parent. umf_ba_linear_destroy() only destroys a mutex and destroys a pool itself (unmaps a range of memory) - so what would be a better name? - see its implementation (ba_os_free() is a wrapper for munmap()):
void umf_ba_linear_destroy(umf_ba_linear_pool_t *pool) {
    util_mutex_destroy_not_free(&pool->metadata.lock);
    ba_os_free(pool, pool->metadata.pool_size);
}

Currently, I'm not sure what I've seen previously, but you're right about your changes. Sorry for that.

@ldorau
Copy link
Contributor Author

ldorau commented Jan 31, 2024

@igchor Can we merge this PR?

@igchor igchor merged commit 9bd8b9b into oneapi-src:main Jan 31, 2024
@ldorau ldorau deleted the Use_base_allocator_in_critnib branch January 31, 2024 18:26
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