16 #ifndef BLOOMBERG_QUANTUM_ALLOCATOR_TRAITS_H 17 #define BLOOMBERG_QUANTUM_ALLOCATOR_TRAITS_H 24 #ifndef __QUANTUM_DEFAULT_POOL_ALLOC_SIZE 25 #ifdef __QUANTUM_DEFAULT_STACK_ALLOC_SIZE 26 #warning Deprecated : use __QUANTUM_DEFAULT_POOL_ALLOC_SIZE instead. 27 #define __QUANTUM_DEFAULT_POOL_ALLOC_SIZE __QUANTUM_DEFAULT_STACK_ALLOC_SIZE 29 #define __QUANTUM_DEFAULT_POOL_ALLOC_SIZE 1000 33 #ifndef __QUANTUM_DEFAULT_CORO_POOL_ALLOC_SIZE 34 #define __QUANTUM_DEFAULT_CORO_POOL_ALLOC_SIZE 200 37 #ifndef __QUANTUM_FUNCTION_ALLOC_SIZE 38 #define __QUANTUM_FUNCTION_ALLOC_SIZE 128 55 #ifdef __QUANTUM_USE_DEFAULT_ALLOCATOR 56 static bool value =
true;
58 static bool value =
false;
69 #ifdef __QUANTUM_USE_DEFAULT_CORO_ALLOCATOR 70 static bool value =
true;
72 static bool value =
false;
83 #ifdef __QUANTUM_ALLOCATE_POOL_FROM_HEAP 84 static bool value =
true;
86 static bool value =
false;
96 static size_type size = __QUANTUM_DEFAULT_POOL_ALLOC_SIZE;
105 static size_type size = __QUANTUM_DEFAULT_CORO_POOL_ALLOC_SIZE;
172 #endif //BLOOMBERG_QUANTUM_ALLOCATOR_TRAITS_H static size_type & ioTaskAllocSize()
Get/set if the default size for IO task object pools.
Definition: quantum_allocator_traits.h:154
Definition: quantum_buffer_impl.h:22
static size_type & defaultPoolAllocSize()
Get/set if the default size for internal object pools (other than coroutine stacks).
Definition: quantum_allocator_traits.h:95
static size_type & taskAllocSize()
Get/set if the default size for task object pools.
Definition: quantum_allocator_traits.h:144
uint16_t size_type
Definition: quantum_allocator_traits.h:47
static bool & allocatePoolFromHeap()
Get/set if the allocator pool for internal objects should use the heap or the application stack.
Definition: quantum_allocator_traits.h:82
static size_type & futureAllocSize()
Get/set if the default size for future object pools.
Definition: quantum_allocator_traits.h:124
static size_type & contextAllocSize()
Get/set if the default size for context object pools.
Definition: quantum_allocator_traits.h:134
static size_type & defaultCoroPoolAllocSize()
Get/set if the default size for coroutine stack pools.
Definition: quantum_allocator_traits.h:104
static bool & useDefaultAllocator()
Get/set if the system allocator should be used for internal objects (other than coroutine stacks).
Definition: quantum_allocator_traits.h:54
static size_type & promiseAllocSize()
Get/set if the default size for promise object pools.
Definition: quantum_allocator_traits.h:114
Allows application-wide settings for the various allocators used by Quantum.
Definition: quantum_allocator_traits.h:46
static bool & useDefaultCoroAllocator()
Get/set if the system allocator should be used for coroutine stacks.
Definition: quantum_allocator_traits.h:68
static size_type & queueListAllocSize()
Get/set if the default size for task queue pools.
Definition: quantum_allocator_traits.h:164