diff options
author | aleexfi <aleexfi@yandex-team.com> | 2023-01-10 00:35:59 +0300 |
---|---|---|
committer | aleexfi <aleexfi@yandex-team.com> | 2023-01-10 00:35:59 +0300 |
commit | 7ade5ad16d098a48b1586948baae4f9b2fa1dbb5 (patch) | |
tree | 0729c2775c7396df1652e638da561be3d88c8b2f /library/cpp/yt/malloc/malloc.cpp | |
parent | 2d79b278f2265d09c965faf97288acceb21da600 (diff) | |
download | ydb-7ade5ad16d098a48b1586948baae4f9b2fa1dbb5.tar.gz |
Add nallocx impl on windows; Remove dependence on allocator coz it doesn't work
Diffstat (limited to 'library/cpp/yt/malloc/malloc.cpp')
-rw-r--r-- | library/cpp/yt/malloc/malloc.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/library/cpp/yt/malloc/malloc.cpp b/library/cpp/yt/malloc/malloc.cpp index abb04e60f9..2455970b71 100644 --- a/library/cpp/yt/malloc/malloc.cpp +++ b/library/cpp/yt/malloc/malloc.cpp @@ -1,11 +1,24 @@ #include "malloc.h" +#include <util/system/compiler.h> #include <util/system/platform.h> #include <stdlib.h> //////////////////////////////////////////////////////////////////////////////// +Y_WEAK extern "C" size_t nallocx(size_t size, int /*flags*/) noexcept +{ + return size; +} + +#ifndef _win_ +Y_WEAK extern "C" size_t malloc_usable_size(void* /*ptr*/) noexcept +{ + return 0; +} +#endif + void* aligned_malloc(size_t size, size_t alignment) { #if defined(_win_) |