scalable_allocator.h File Reference
`#include <stddef.h>`
`#include <stdint.h>`
Include dependency graph for scalable_allocator.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros

#define | __TBB_EXPORTED_FUNC

## Enumerations

enum | ScalableAllocationResult { TBBMALLOC_OK , TBBMALLOC_INVALID_PARAM , TBBMALLOC_UNSUPPORTED , TBBMALLOC_NO_MEMORY , TBBMALLOC_NO_EFFECT }
enum | AllocationModeParam { TBBMALLOC_USE_HUGE_PAGES , USE_HUGE_PAGES = TBBMALLOC_USE_HUGE_PAGES , TBBMALLOC_SET_SOFT_HEAP_LIMIT , TBBMALLOC_SET_HUGE_SIZE_THRESHOLD }
enum | ScalableAllocationCmd { TBBMALLOC_CLEAN_ALL_BUFFERS , TBBMALLOC_CLEAN_THREAD_BUFFERS }

## Functions

void *__TBB_EXPORTED_FUNC | scalable_malloc (size_t size)
void __TBB_EXPORTED_FUNC | scalable_free (void *ptr)
void *__TBB_EXPORTED_FUNC | scalable_realloc (void *ptr, size_t size)
void *__TBB_EXPORTED_FUNC | scalable_calloc (size_t nobj, size_t size)
int __TBB_EXPORTED_FUNC | scalable_posix_memalign (void **memptr, size_t alignment, size_t size)
void *__TBB_EXPORTED_FUNC | scalable_aligned_malloc (size_t size, size_t alignment)
void *__TBB_EXPORTED_FUNC | scalable_aligned_realloc (void *ptr, size_t size, size_t alignment)
void __TBB_EXPORTED_FUNC | scalable_aligned_free (void *ptr)
size_t __TBB_EXPORTED_FUNC | scalable_msize (void *ptr)
int __TBB_EXPORTED_FUNC | scalable_allocation_mode (int param, intptr_t value)
int __TBB_EXPORTED_FUNC | scalable_allocation_command (int cmd, void *param)

## Macro Definition Documentation

## __TBB_EXPORTED_FUNC

#define __TBB_EXPORTED_FUNC

Definition at line 38 of file scalable_allocator.h.

## Enumeration Type Documentation

## AllocationModeParam

enum AllocationModeParam

Enumerator
TBBMALLOC_USE_HUGE_PAGES |
USE_HUGE_PAGES |
TBBMALLOC_SET_SOFT_HEAP_LIMIT |
TBBMALLOC_SET_HUGE_SIZE_THRESHOLD |

Definition at line 90 of file scalable_allocator.h.

{
TBBMALLOC_USE_HUGE_PAGES, /* value turns using huge pages on and off */
/* deprecated, kept for backward compatibility only */
USE_HUGE_PAGES = TBBMALLOC_USE_HUGE_PAGES,
/* try to limit memory consumption value (Bytes), clean internal buffers
if limit is exceeded, but not prevents from requesting memory from OS */
TBBMALLOC_SET_SOFT_HEAP_LIMIT,
/* Lower bound for the size (Bytes), that is interpreted as huge
* and not released during regular cleanup operations. */
TBBMALLOC_SET_HUGE_SIZE_THRESHOLD
} AllocationModeParam;
AllocationModeParam
AllocationModeParam
Definition: scalable_allocator.h:90
TBBMALLOC_USE_HUGE_PAGES
@ TBBMALLOC_USE_HUGE_PAGES
Definition: scalable_allocator.h:91
USE_HUGE_PAGES
@ USE_HUGE_PAGES
Definition: scalable_allocator.h:93
TBBMALLOC_SET_HUGE_SIZE_THRESHOLD
@ TBBMALLOC_SET_HUGE_SIZE_THRESHOLD
Definition: scalable_allocator.h:99
TBBMALLOC_SET_SOFT_HEAP_LIMIT
@ TBBMALLOC_SET_SOFT_HEAP_LIMIT
Definition: scalable_allocator.h:96

## ScalableAllocationCmd

enum ScalableAllocationCmd

Enumerator
TBBMALLOC_CLEAN_ALL_BUFFERS |
TBBMALLOC_CLEAN_THREAD_BUFFERS |

Definition at line 106 of file scalable_allocator.h.

{
/* Clean internal allocator buffers for all threads.
Returns TBBMALLOC_NO_EFFECT if no buffers cleaned,
TBBMALLOC_OK if some memory released from buffers. */
TBBMALLOC_CLEAN_ALL_BUFFERS,
/* Clean internal allocator buffer for current thread only.
Return values same as for TBBMALLOC_CLEAN_ALL_BUFFERS. */
TBBMALLOC_CLEAN_THREAD_BUFFERS
} ScalableAllocationCmd;
ScalableAllocationCmd
ScalableAllocationCmd
Definition: scalable_allocator.h:106
TBBMALLOC_CLEAN_THREAD_BUFFERS
@ TBBMALLOC_CLEAN_THREAD_BUFFERS
Definition: scalable_allocator.h:113
TBBMALLOC_CLEAN_ALL_BUFFERS
@ TBBMALLOC_CLEAN_ALL_BUFFERS
Definition: scalable_allocator.h:110

## ScalableAllocationResult

enum ScalableAllocationResult

Enumerator
TBBMALLOC_OK |
TBBMALLOC_INVALID_PARAM |
TBBMALLOC_UNSUPPORTED |
TBBMALLOC_NO_MEMORY |
TBBMALLOC_NO_EFFECT |

Definition at line 80 of file scalable_allocator.h.

{
TBBMALLOC_OK,
TBBMALLOC_INVALID_PARAM,
TBBMALLOC_UNSUPPORTED,
TBBMALLOC_NO_MEMORY,
TBBMALLOC_NO_EFFECT
} ScalableAllocationResult;
ScalableAllocationResult
ScalableAllocationResult
Definition: scalable_allocator.h:80
TBBMALLOC_OK
@ TBBMALLOC_OK
Definition: scalable_allocator.h:81
TBBMALLOC_NO_EFFECT
@ TBBMALLOC_NO_EFFECT
Definition: scalable_allocator.h:85
TBBMALLOC_NO_MEMORY
@ TBBMALLOC_NO_MEMORY
Definition: scalable_allocator.h:84
TBBMALLOC_UNSUPPORTED
@ TBBMALLOC_UNSUPPORTED
Definition: scalable_allocator.h:83
TBBMALLOC_INVALID_PARAM
@ TBBMALLOC_INVALID_PARAM
Definition: scalable_allocator.h:82

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.