Skip to content

Chunk alloc/dealloc + buddy fix#240

Merged
perarnau merged 6 commits intomasterfrom
rpereira/allocator-chunk
Mar 12, 2025
Merged

Chunk alloc/dealloc + buddy fix#240
perarnau merged 6 commits intomasterfrom
rpereira/allocator-chunk

Conversation

@rpereira-dev
Copy link
Copy Markdown
Contributor

Added two optional interfaces to allocate/deallocate allocator's chunk directly, saving the cost of a hashmap - only implemented in the buddy allocator

Fixed issues in the buddy allocator that ultimately caused non-power of two allocations to return too small allocation.

@rpereira-dev rpereira-dev requested a review from perarnau March 10, 2025 14:37
@rpereira-dev rpereira-dev added bug Something isn't working enhancement New feature or request labels Mar 10, 2025
perarnau and others added 2 commits March 10, 2025 15:04
Update excit to remove issues with hardcoded -Werror, test the code
against NVHPC SDK 24.7, and fix a couple of bugs in the process.

Note: src/features.c depends on CUDA when CUDA is active, so might as
well include the CUDA flags in the entire library.

Note: The hwloc tests are written to test hwloc or the platform, instead of
testing that aml is doing the right thing. We will need to change them
drastically.
@rpereira-dev rpereira-dev force-pushed the rpereira/allocator-chunk branch from 9a0c7b9 to d40214e Compare March 10, 2025 15:05
Copy link
Copy Markdown
Contributor

@perarnau perarnau left a comment

Choose a reason for hiding this comment

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

Overall LGTM. Minor edits needed. And a rebase on master, now that the CI is working again.
I note that you don't NULL the new operators in the rest of the implementations. It's not strictly necessary but would be appreciated.

Comment thread src/allocator/allocator.c Outdated
Comment thread src/allocator/buddy.c Outdated
Romain PEREIRA added 3 commits March 12, 2025 13:45
set null explicitely to global variables ops
returning AML_ENOTSUP on optional methods not implemented in allocators + added an assert for existance of mandatory methods
@perarnau perarnau merged commit 06d1965 into master Mar 12, 2025
13 checks passed
@perarnau perarnau deleted the rpereira/allocator-chunk branch March 12, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants