16#include <dispenso/detail/math.h>
17#include <dispenso/platform.h>
30DISPENSO_DLL_ACCESS
char* allocSmallBufferImpl(
size_t ordinal);
31DISPENSO_DLL_ACCESS
void deallocSmallBufferImpl(
size_t ordinal,
void*
buf);
33DISPENSO_DLL_ACCESS
size_t approxBytesAllocatedSmallBufferImpl(
size_t ordinal);
41constexpr size_t getOrdinal(
size_t blockSize) {
45template <
size_t kBlockSize>
47#if defined(DISPENSO_NO_SMALL_BUFFER_ALLOCATOR)
50 return allocSmallBufferImpl(getOrdinal(
kBlockSize));
54template <
size_t kBlockSize>
59template <
size_t kBlockSize>
61#if defined(DISPENSO_NO_SMALL_BUFFER_ALLOCATOR)
68template <
size_t kBlockSize>
86template <
size_t kBlockSize>
88 return detail::allocSmallOrLarge<kBlockSize>();
99template <
size_t kBlockSize>
101 detail::deallocSmallOrLarge<kBlockSize>(
buf);
111template <
size_t kBlockSize>
113 return detail::approxBytesAllocatedSmallBufferImpl(detail::getOrdinal(
kBlockSize));
detail::OpResult< T > OpResult
void deallocSmallBuffer(void *buf)
constexpr size_t kMaxSmallBufferSize
char * allocSmallBuffer()
size_t approxBytesAllocatedSmallBuffer()