#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

#500 in Memory management

Download history 58/week @ 2024-01-02 87/week @ 2024-01-09 84/week @ 2024-01-16 69/week @ 2024-01-23 103/week @ 2024-01-30 123/week @ 2024-02-06 74/week @ 2024-02-13 148/week @ 2024-02-20 140/week @ 2024-02-27 115/week @ 2024-03-05 89/week @ 2024-03-12 103/week @ 2024-03-19 111/week @ 2024-03-26 141/week @ 2024-04-02 149/week @ 2024-04-09 143/week @ 2024-04-16

570 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