Merge changes I9c181568,Ic0b08511 into main

* changes:
  Add aligned_alloc to linker_memory.cpp
  Add missing assert.h include
This commit is contained in:
Ryan Prichard 2023-07-25 20:14:40 +00:00 committed by Gerrit Code Review
commit 504590d1e2
2 changed files with 5 additions and 0 deletions

View file

@ -27,6 +27,7 @@
*/
#include <android/api-level.h>
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>

View file

@ -76,6 +76,10 @@ void* memalign(size_t alignment, size_t byte_count) {
return get_allocator().memalign(alignment, byte_count);
}
void* aligned_alloc(size_t alignment, size_t byte_count) {
return get_allocator().memalign(alignment, byte_count);
}
void* calloc(size_t item_count, size_t item_size) {
return get_allocator().alloc(item_count*item_size);
}