mdbx: макрос osal_malloc_usable_size() вместо непосредственного использования malloc_usable_size().

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2024-12-17 18:52:08 +03:00
parent 5168c80be8
commit 4607184999
4 changed files with 22 additions and 22 deletions

View File

@@ -153,12 +153,12 @@ typedef pthread_mutex_t osal_fastmutex_t;
#endif /* Platform */
#if __GLIBC_PREREQ(2, 12) || defined(__FreeBSD__) || defined(malloc_usable_size)
/* malloc_usable_size() already provided */
#define osal_malloc_usable_size(ptr) malloc_usable_size(ptr)
#elif defined(__APPLE__)
#define malloc_usable_size(ptr) malloc_size(ptr)
#define osal_malloc_usable_size(ptr) malloc_size(ptr)
#elif defined(_MSC_VER) && !MDBX_WITHOUT_MSVC_CRT
#define malloc_usable_size(ptr) _msize(ptr)
#endif /* malloc_usable_size */
#define osal_malloc_usable_size(ptr) _msize(ptr)
#endif /* osal_malloc_usable_size */
/*----------------------------------------------------------------------------*/
/* OS abstraction layer stuff */