ezrosent / allocators-rs

Allocators in Rust
Apache License 2.0
311 stars 28 forks source link

Fix next_multiple for mmap-alloc #55

Closed Dr-Emann closed 7 years ago

Dr-Emann commented 7 years ago

The remainder should be subtracted from the unit, not the size: e.g.

next_multiple(4, 4096); // returns 4
next_multiple(10000, 4096); // returns 18192
joshlf commented 7 years ago

Thanks for the PR, and good catch!

A couple of small fixes :

Other than that, looks good!

joshlf commented 7 years ago

Thanks!