AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
ThreadLocalAllocator.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or
9having been advised so by Algoryx Simulation AB for a time limited evaluation,
10or having purchased a valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17
18#pragma once
19
20#include <cstddef>
21#include <agx/agxCore_export.h>
22
23namespace agx
24{
25 class Container;
26
28 {
29 public:
34
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}
#define AGXCORE_EXPORT
The Container is the base class for several of the container classes proided by AGX,...
Definition: Container.h:35
ThreadLocalAllocator & operator=(ThreadLocalAllocator &&other)
void deallocateBytes(void *buffer, size_t numBytes)
ThreadLocalAllocator(const ThreadLocalAllocator &other)
void * allocateBytes(size_t numBytes)
ThreadLocalAllocator & operator=(const ThreadLocalAllocator &other)
void setContainer(Container *container)
ThreadLocalAllocator(ThreadLocalAllocator &&other)
The agx namespace contains the dynamics/math part of the AGX Dynamics API.