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

gg-alloc

A custom allocator that only returns pointers above 2G

1 stable release

1.0.0 Jul 2, 2022

#559 in Memory management

Download history 93/week @ 2024-03-11 87/week @ 2024-03-18 119/week @ 2024-03-25 141/week @ 2024-04-01 136/week @ 2024-04-08 173/week @ 2024-04-15 123/week @ 2024-04-22 92/week @ 2024-04-29 69/week @ 2024-05-06 53/week @ 2024-05-13 66/week @ 2024-05-20 93/week @ 2024-05-27 71/week @ 2024-06-03 78/week @ 2024-06-10 88/week @ 2024-06-17 103/week @ 2024-06-24

348 downloads per month
Used in 4 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