-
Notifications
You must be signed in to change notification settings - Fork 76
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, fixed mem_realloc behavior when there are multiple references to the memory buffer being reallocated. In this case, the implementation now allocates a new buffer and copies the contents and decrements the reference counter on the original memory buffer. This way the other references for the old buffer remain valid. Also, fixed formatting in mem_status.
- Loading branch information
Showing
1 changed file
with
80 additions
and
38 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