AGX Dynamics
2.37.2.0
ThreadLocalAllocator.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2024. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, are copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or
9
having been advised so by Algoryx Simulation AB for a time limited evaluation,
10
or having purchased a valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
18
#pragma once
19
20
#include <cstddef>
21
#include <
agx/agxCore_export.h
>
22
23
namespace
agx
24
{
25
class
Container;
26
27
class
AGXCORE_EXPORT
ThreadLocalAllocator
28
{
29
public
:
30
ThreadLocalAllocator
();
31
ThreadLocalAllocator
(
const
ThreadLocalAllocator
& other);
32
ThreadLocalAllocator
(
ThreadLocalAllocator
&& other);
33
~
ThreadLocalAllocator
();
34
35
ThreadLocalAllocator
& operator=(
const
ThreadLocalAllocator
& other);
36
ThreadLocalAllocator
& operator=(
ThreadLocalAllocator
&& other);
37
38
39
void
setContainer(
Container
* container);
40
void
* allocateBytes(
size_t
numBytes);
41
void
deallocateBytes(
void
* buffer,
size_t
numBytes);
42
43
private
:
44
void
clear
();
45
46
private
:
47
// m_container is not a salient attribute. It represents an owned-by
48
// relationship that should reflect the physical composition and
49
// copying/moving containers should not "leak" this pointer into the new
50
// container.
51
Container
* m_container;
52
};
53
}
agxTerrain::Profiler::clear
AGXTERRAIN_EXPORT void clear()
agx::Container
The Container is the base class for several of the container classes proided by AGX, such as agx::Vector and agx::HashSet.
Definition:
Container.h:34
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:22
agxCore_export.h
agx::ThreadLocalAllocator
Definition:
ThreadLocalAllocator.h:27
AGXCORE_EXPORT
#define AGXCORE_EXPORT
include
agx
ThreadLocalAllocator.h
Generated on Sun Jan 28 2024 11:19:35 for AGX Dynamics by
1.8.13