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: isolate allocators in bun.heap #16451

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fel1x-developer
Copy link
Contributor

@fel1x-developer fel1x-developer commented Jan 17, 2025

What does this PR do?

My original plan was to put them under bun.allocator.*, but src/allocators.zig already exists which can confuse devs and zig's standard library's allocator are under std.heap.*, so I decided to put them under bun.heap.*

From now on, allocators should be accessed by bun.heap.*, not by @import("foo.zig")

By doing this, vscode-zig detected few cases where const can be used in place of var, so there is definitely reason to do this.

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

@fel1x-developer fel1x-developer changed the title Isolate allocators in bun.heap refactor: isolate allocators in bun.heap Jan 17, 2025
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.

1 participant