diff options
author | robot-piglet <[email protected]> | 2025-08-26 16:09:43 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-08-26 16:49:33 +0300 |
commit | b5712aa4d10755c6a20d652fb1f823c2680b793a (patch) | |
tree | 1b37ecca936e50b61caec5237e12c66ff21606a1 | |
parent | 6d59cbff3b4093ea971e87b82450935cc06918ef (diff) |
Intermediate changes
commit_hash:42684503f86c4df0cb68327e220c292b1cbe481d
-rw-r--r-- | library/cpp/balloc/balloc.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/library/cpp/balloc/balloc.cpp b/library/cpp/balloc/balloc.cpp index fab489db4c5..bf7876f2aa2 100644 --- a/library/cpp/balloc/balloc.cpp +++ b/library/cpp/balloc/balloc.cpp @@ -290,12 +290,16 @@ extern "C" void EnableBalloc() { NBalloc::Enable(); } -extern "C" void* memalign(size_t alignment, size_t size) { +extern "C" void* aligned_alloc(size_t alignment, size_t size) { void* ptr; int res = posix_memalign(&ptr, alignment, size); return res ? nullptr : ptr; } +extern "C" void* memalign(size_t alignment, size_t size) { + return aligned_alloc(alignment, size); +} + extern "C" void* valloc(size_t size) { return memalign(NBalloc::PAGE_ELEM, size); } |