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

gg-alloc

A custom allocator that only returns pointers above 2G

1 stable release

1.0.0 Jul 2, 2022

#639 in WebAssembly

Download history 140/week @ 2023-11-20 170/week @ 2023-11-27 134/week @ 2023-12-04 93/week @ 2023-12-11 72/week @ 2023-12-18 37/week @ 2023-12-25 56/week @ 2024-01-01 83/week @ 2024-01-08 85/week @ 2024-01-15 70/week @ 2024-01-22 102/week @ 2024-01-29 125/week @ 2024-02-05 67/week @ 2024-02-12 139/week @ 2024-02-19 130/week @ 2024-02-26 135/week @ 2024-03-04

476 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