Skip to content

feat(allocator): fixed size allocators#12082

Merged
graphite-app[bot] merged 1 commit intomainfrom
07-04-feat_allocator_fixed_size_allocators
Jul 9, 2025
Merged

feat(allocator): fixed size allocators#12082
graphite-app[bot] merged 1 commit intomainfrom
07-04-feat_allocator_fixed_size_allocators

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jul 4, 2025

Introduce cargo feature fixed_size on oxc_allocator crate. This feature causes AllocatorPool to create fixed-size Allocators of 2 GiB size, with 4 GiB alignment - suitable for raw transfer.

We run tests with --all-features, so to prevent using fixed-size allocators in oxc_linter tests, have also added a disable_fixed_size feature. AllocatorPool only uses fixed-size allocators if fixed_size feature is enabled, and disable_fixed_size is not.

This is something of a hack, but I don't know a better way to achieve this.

@github-actions github-actions bot added the C-enhancement Category - New feature or request label Jul 4, 2025
Copy link
Member Author

overlookmotel commented Jul 4, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 4, 2025

CodSpeed Instrumentation Performance Report

Merging #12082 will not alter performance

Comparing 07-04-feat_allocator_fixed_size_allocators (704350a) with 07-04-refactor_allocator_add_allocatorwrapper_abstraction_to_allocatorpool_ (068669f)

Summary

✅ 34 untouched benchmarks

@overlookmotel overlookmotel force-pushed the 07-04-refactor_allocator_add_allocatorwrapper_abstraction_to_allocatorpool_ branch from c61ebf4 to daf8ee2 Compare July 7, 2025 10:48
@overlookmotel overlookmotel force-pushed the 07-04-feat_allocator_fixed_size_allocators branch from bf5481c to a663956 Compare July 7, 2025 10:48
@overlookmotel overlookmotel force-pushed the 07-04-refactor_allocator_add_allocatorwrapper_abstraction_to_allocatorpool_ branch from daf8ee2 to 2002c8c Compare July 7, 2025 17:51
@overlookmotel overlookmotel force-pushed the 07-04-feat_allocator_fixed_size_allocators branch from a663956 to baf0c72 Compare July 7, 2025 17:51
@overlookmotel overlookmotel force-pushed the 07-04-refactor_allocator_add_allocatorwrapper_abstraction_to_allocatorpool_ branch from 2002c8c to 8e6cf3d Compare July 8, 2025 21:51
@overlookmotel overlookmotel force-pushed the 07-04-feat_allocator_fixed_size_allocators branch 2 times, most recently from 62a1ea2 to 858c84b Compare July 8, 2025 22:23
@overlookmotel overlookmotel force-pushed the 07-04-refactor_allocator_add_allocatorwrapper_abstraction_to_allocatorpool_ branch from 8e6cf3d to 457a1af Compare July 8, 2025 22:23
@overlookmotel overlookmotel marked this pull request as ready for review July 8, 2025 22:25
@overlookmotel overlookmotel requested a review from camc314 July 8, 2025 22:25
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jul 9, 2025
Copy link
Contributor

camc314 commented Jul 9, 2025

Merge activity

Introduce cargo feature `fixed_size` on `oxc_allocator` crate. This feature causes `AllocatorPool` to create fixed-size `Allocator`s of 2 GiB size, with 4 GiB alignment - suitable for raw transfer.

We run tests with `--all-features`, so to prevent using fixed-size allocators in `oxc_linter` tests, have also added a `disable_fixed_size` feature. `AllocatorPool` only uses fixed-size allocators if `fixed_size` feature is enabled, and `disable_fixed_size` is not.

This is something of a hack, but I don't know a better way to achieve this.
@graphite-app graphite-app bot force-pushed the 07-04-refactor_allocator_add_allocatorwrapper_abstraction_to_allocatorpool_ branch from 457a1af to 068669f Compare July 9, 2025 08:56
@graphite-app graphite-app bot force-pushed the 07-04-feat_allocator_fixed_size_allocators branch from 858c84b to 704350a Compare July 9, 2025 08:57
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 9, 2025
Base automatically changed from 07-04-refactor_allocator_add_allocatorwrapper_abstraction_to_allocatorpool_ to main July 9, 2025 09:05
@graphite-app graphite-app bot merged commit 704350a into main Jul 9, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 07-04-feat_allocator_fixed_size_allocators branch July 9, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants