diff options
| author | aleexfi <[email protected]> | 2023-01-10 00:35:59 +0300 |
|---|---|---|
| committer | aleexfi <[email protected]> | 2023-01-10 00:35:59 +0300 |
| commit | 7ade5ad16d098a48b1586948baae4f9b2fa1dbb5 (patch) | |
| tree | 0729c2775c7396df1652e638da561be3d88c8b2f /library/cpp/yt/memory | |
| parent | 2d79b278f2265d09c965faf97288acceb21da600 (diff) | |
Add nallocx impl on windows; Remove dependence on allocator coz it doesn't work
Diffstat (limited to 'library/cpp/yt/memory')
| -rw-r--r-- | library/cpp/yt/memory/chunked_memory_pool-inl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/cpp/yt/memory/chunked_memory_pool-inl.h b/library/cpp/yt/memory/chunked_memory_pool-inl.h index 267c3e92217..58a0cefcc2f 100644 --- a/library/cpp/yt/memory/chunked_memory_pool-inl.h +++ b/library/cpp/yt/memory/chunked_memory_pool-inl.h @@ -29,10 +29,13 @@ TDerived* TAllocationHolder::Allocate(size_t size, TRefCountedTypeCookie cookie) { auto requestedSize = sizeof(TDerived) + size; auto* ptr = ::malloc(requestedSize); + +#ifndef _win_ auto allocatedSize = ::malloc_usable_size(ptr); if (allocatedSize) { size += allocatedSize - requestedSize; } +#endif auto* instance = static_cast<TDerived*>(ptr); |
