-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
runtime page size detection + rework GeneralPurposeAllocator to reduce active mapping count + Allocator VTable API update #20511
Conversation
Hi, thanks so much for putting in the work to make runtime page size a reality :) These |
Inlining: Else: |
Thanks, I am in favor of this. I believe you may be able to achieve this by assigning to a
Yes, |
Local tests now pass. I just can't figure out how to test on Windows. |
I'd like to re-run CI. I cannot get local tests to pass, but I would like to see how the CI runner behaves. There seems to be another issue besides page size that prevents me from running tests myself.
Whether I use this PR or just edit the Do these errors suggest anything in particular? Maybe I didn't replicate the CI script closely enough? |
I think you might need to rebase this on master for CI to run? 🤔 |
Alright, rebased again. Though what I understood was that CI needed to be invoked by a Zig member. Hopefully I can fix up the stylistic issues soon. |
For the wasm failure in your local run of the tests, I see:
I suspect this is from using a too-recent wasmtime, and downgrading to v10.0.2 (which is the version CI runs) will fix it. See #20747. |
There was an ensureUnusedCapacity() call that invalidated a looked-up hash table entry. Move it earlier.
Accept a slight performance degradation when unit testing for better debuggability when a leak or double-free is detected.
Windows-only, depends on kernel32 in violation of zig std lib policy, and redundant with other cross-platform APIs that perform the same functionality.
No longer need this windows-specific behavior.
This broke the UEFI allocators |
release notes
This PR implements runtime page sizes. Closes #4082. Closes #11308. Closes #16331. Closes #20038. Closes #20714.
Notable changes:
mem.page_size
.heap.min_page_size
,heap.max_page_size
,heap.pageSize()
.options.min_page_size
,options.max_page_size
,options.queryPageSizeFn
.Not implemented:
align_page
alignment value. Usealign(std.heap.min_page_size)
on your pointers instead.