Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mem: Align data to natural alignment.
Ensure that the pointer returned by mem_alloc & co. is properly aligned similar to malloc on a given platform. This is important e.g. for SIMD processing, including libc string operations. Also, made mem_realloc optimize away realloc call if there is enough storage in the allocated buffer. This only works if the input pointer is the only reference to the memory block. Also, fixed formatting in mem_status.
- Loading branch information
Showing
1 changed file
with
96 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters