purpleprotocol / mimalloc_rust

A Rust wrapper over Microsoft's MiMalloc memory allocator
MIT License
486 stars 42 forks source link

Improve our GlobalAlloc impl #64

Closed thomcc closed 3 years ago

thomcc commented 3 years ago

Most important change:

This fixes a soundness bug in the realloc impl, where we were testing versus layout.size() and not new_size, which will return the wrong results. This probably can cause code to get alignments different than they requested, but maybe nobody noticed, or maybe it's rare enough not to happen much.

Other changes:


Because of the first one, it's probably worth cutting another release after landing this.