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

gg-alloc

A custom allocator that only returns pointers above 2G

1 stable release

1.0.0 Jul 2, 2022

#610 in Memory management

Download history 80/week @ 2024-09-02 53/week @ 2024-09-09 63/week @ 2024-09-16 115/week @ 2024-09-23 72/week @ 2024-09-30 355/week @ 2024-10-07 164/week @ 2024-10-14 74/week @ 2024-10-21 161/week @ 2024-10-28 367/week @ 2024-11-04 152/week @ 2024-11-11 136/week @ 2024-11-18 299/week @ 2024-11-25 305/week @ 2024-12-02 172/week @ 2024-12-09 170/week @ 2024-12-16

960 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