#range #pointers #allocator #above #2g-4g

gg-alloc

A custom allocator that only returns pointers above 2G

1 stable release

1.0.0 Jul 2, 2022

#565 in Memory management

Download history 111/week @ 2024-07-23 161/week @ 2024-07-30 414/week @ 2024-08-06 139/week @ 2024-08-13 126/week @ 2024-08-20 107/week @ 2024-08-27 83/week @ 2024-09-03 58/week @ 2024-09-10 57/week @ 2024-09-17 110/week @ 2024-09-24 90/week @ 2024-10-01 365/week @ 2024-10-08 137/week @ 2024-10-15 81/week @ 2024-10-22 163/week @ 2024-10-29 358/week @ 2024-11-05

774 downloads per month
Used in 3 crates (via wasm-bindgen-test)

GPL-3.0 license

15KB
111 lines

gg-alloc

A custom allocator that always returns pointers in the 2G-4G range.

That is, pointers that are valid u32 but not valid i32. This is used to test the wasm-bindgen crate, which used to have problems when dealing with more than 2GB of memory in WebAssembly because of this.

No runtime deps