Skip to content
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

refactor: consolidate allocators #16061

Merged
merged 14 commits into from
Jan 9, 2025
Merged

refactor: consolidate allocators #16061

merged 14 commits into from
Jan 9, 2025

Conversation

DonIsaac
Copy link
Contributor

@DonIsaac DonIsaac commented Dec 30, 2024

What does this PR do?

Moves all memory allocators into src/allocators. The following allocators are affected:

  • NullableAllocator
  • MimallocArena
  • MaxHeapAllocator
  • LinuxMemFdAllocator
  • All allocators in memory_allocator.zig (CAllocator, ZAllocator, HugeAllocator, etc)

I also added an underflow check to LinuxMemFdAllocator in case a consumer calls deref() without first calling ref()

@robobun
Copy link

robobun commented Dec 30, 2024

Updated 2:39 PM PT - Jan 8th, 2025

@DonIsaac, your commit 1e0954b has passed in #9254! 🎉


🧪   try this PR locally:

bunx bun-pr 16061

@DonIsaac DonIsaac enabled auto-merge January 2, 2025 01:51
Copy link
Member

@dylan-conway dylan-conway left a comment

Choose a reason for hiding this comment

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

Just one comment

@DonIsaac DonIsaac requested a review from dylan-conway January 8, 2025 21:46
Copy link
Member

@dylan-conway dylan-conway left a comment

Choose a reason for hiding this comment

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

Looks good

@DonIsaac DonIsaac added this pull request to the merge queue Jan 8, 2025
Merged via the queue into main with commit a733421 Jan 9, 2025
69 checks passed
@DonIsaac DonIsaac deleted the don/refactor/allocators branch January 9, 2025 00:08
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.

3 participants