tbb::interface6::internal::pool_base Class Reference

Base of thread-safe pool allocator for variable-size requests. More...

`#include <memory_pool.h>`

Inheritance diagram for tbb::interface6::internal::pool_base:
Collaboration diagram for tbb::interface6::internal::pool_base:

## Public Member Functions

void | recycle ()
| Reset pool to reuse its memory (free all objects at once) More...
void * | malloc (size_t size)
| The "malloc" analogue to allocate block of memory of size bytes. More...
void | free (void *ptr)
| The "free" analogue to discard a previously allocated piece of memory. More...
void * | realloc (void *ptr, size_t size)
| The "realloc" analogue complementing pool_malloc. More...

## Protected Member Functions

void | destroy ()
| destroy pool - must be called in a child class More...

## Protected Attributes

rml::MemoryPool * | my_pool

## Additional Inherited Members

Private Member Functions inherited from tbb::internal::no_copy
| no_copy (const no_copy &)=delete
| no_copy ()=default

## Detailed Description

Base of thread-safe pool allocator for variable-size requests.

Definition at line 46 of file memory_pool.h.

## Member Function Documentation

## destroy()

void tbb::interface6::internal::pool_base::destroy | ( |  | ) |

inline protected

destroy pool - must be called in a child class

Definition at line 67 of file memory_pool.h.

{ rml::pool_destroy(my_pool); }
tbb::interface6::internal::pool_base::my_pool
rml::MemoryPool * my_pool
Definition: memory_pool.h:69

References my_pool.

Referenced by tbb::interface6::fixed_pool::~fixed_pool(), and tbb::interface6::memory_pool< Alloc >::~memory_pool().

Here is the caller graph for this function:

## free()

void tbb::interface6::internal::pool_base::free | ( | void * | ptr | ) |

inline

The "free" analogue to discard a previously allocated piece of memory.

Definition at line 57 of file memory_pool.h.

{ rml::pool_free(my_pool, ptr); }

References my_pool.

## malloc()

void* tbb::interface6::internal::pool_base::malloc | ( | size_t | size | ) |

inline

The "malloc" analogue to allocate block of memory of size bytes.

Definition at line 54 of file memory_pool.h.

{ return rml::pool_malloc(my_pool, size); }
size
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t size
Definition: ittnotify_static.h:109

References my_pool, and size.

## realloc()

void* tbb::interface6::internal::pool_base::realloc | ( | void * | ptr,
|  | size_t | size
| ) |  |

inline

The "realloc" analogue complementing pool_malloc.

Definition at line 61 of file memory_pool.h.

{
return rml::pool_realloc(my_pool, ptr, size);
}

References my_pool, and size.

## recycle()

void tbb::interface6::internal::pool_base::recycle | ( |  | ) |

inline

Reset pool to reuse its memory (free all objects at once)

Definition at line 51 of file memory_pool.h.

{ rml::pool_reset(my_pool); }

References my_pool.

## Member Data Documentation

## my_pool

rml::MemoryPool* tbb::interface6::internal::pool_base::my_pool

protected

Definition at line 69 of file memory_pool.h.

Referenced by destroy(), tbb::interface6::fixed_pool::fixed_pool(), free(), malloc(), tbb::interface6::memory_pool< Alloc >::memory_pool(), realloc(), and recycle().

The documentation for this class was generated from the following file:

- memory_pool.h

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.