24 typedef void (*FUObjectAllocatorCallback)(
void* InObject,
const std::string& InName,
size_t InSize,
size_t InAlignment,
class UClass* InClass);
32 enum { Value =
false };
35 template <>
struct TIsIntegral< bool> {
enum { Value =
true }; };
36 template <>
struct TIsIntegral< char> {
enum { Value =
true }; };
37 template <>
struct TIsIntegral<signed char> {
enum { Value =
true }; };
38 template <>
struct TIsIntegral<unsigned char> {
enum { Value =
true }; };
39 template <>
struct TIsIntegral< char16_t> {
enum { Value =
true }; };
40 template <>
struct TIsIntegral< char32_t> {
enum { Value =
true }; };
41 template <>
struct TIsIntegral< wchar_t> {
enum { Value =
true }; };
42 template <>
struct TIsIntegral< short> {
enum { Value =
true }; };
43 template <>
struct TIsIntegral<unsigned short> {
enum { Value =
true }; };
44 template <>
struct TIsIntegral< int> {
enum { Value =
true }; };
45 template <>
struct TIsIntegral<unsigned int> {
enum { Value =
true }; };
46 template <>
struct TIsIntegral< long> {
enum { Value =
true }; };
47 template <>
struct TIsIntegral<unsigned long> {
enum { Value =
true }; };
48 template <>
struct TIsIntegral< long long> {
enum { Value =
true }; };
49 template <>
struct TIsIntegral<unsigned long long> {
enum { Value =
true }; };
61 enum { Value =
false };
64 template <
typename T>
struct TIsPointer<T*> {
enum { Value =
true }; };
79 FORCEINLINE
constexpr T Align(T Val, uint64_t Alignment)
83 return (T)(((uint64_t)Val + Alignment - 1) & ~(Alignment - 1));
102 m_PermanentObjectPoolSize(0),
103 m_PermanentObjectPool(nullptr),
104 m_PermanentObjectPoolTail(nullptr),
105 m_PermanentObjectPoolExceededTail(nullptr)
124 void Initialize(uint8_t* pMemoryStart,
size_t elemetSizeBytes,
size_t numberOfElemets);
139 return ((
const uint8_t*)Object >= m_PermanentObjectPool) && ((
const uint8_t*)Object < m_PermanentObjectPoolTail);
164 void RegisterUObjectsStatisticsCallback(FUObjectAllocatorCallback dumpCallback);
214 int32_t m_PermanentObjectPoolSize;
217 uint8_t* m_PermanentObjectPool;
220 uint8_t* m_PermanentObjectPoolTail;
223 uint8_t* m_PermanentObjectPoolEnd;
226 uint8_t* m_PermanentObjectPoolExceededTail;
229 uint32_t m_BareUObjectsSize;
232 uint32_t m_AlignedUObjectsSize;
240 uint32_t m_NumberOfUObjects;
249 extern KARMA_API FUObjectAllocator GUObjectAllocator;
Karma's std::vector wrapper.
Definition KarmaTypes.h:128
Definition UObjectAllocator.h:95
uint8_t * GetPermanentObjectPool() const
Definition UObjectAllocator.h:184
uint32_t GetPermanentPoolSize() const
Definition UObjectAllocator.h:189
void BootMessage()
Definition UObjectAllocator.cpp:40
uint8_t * GetPermanentObjectPoolTail() const
Definition UObjectAllocator.h:179
uint8_t * GetPermanentObjectPoolEnd() const
Definition UObjectAllocator.h:194
FUObjectAllocator()
Definition UObjectAllocator.h:101
uint32_t GetNumberOfUObjects() const
Definition UObjectAllocator.h:209
uint32_t GetBareUObjectSize() const
Definition UObjectAllocator.h:199
void DumpUObjectsInformation(void *InObject, const std::string &InName, size_t InSize, size_t InAlignment, class UClass *InClass)
Definition UObjectAllocator.cpp:110
uint32_t GetAlignedUObjectSize() const
Definition UObjectAllocator.h:204
UObjectBase * AllocateUObject(size_t Size, size_t Alignment, bool bAllowPermanent)
Definition UObjectAllocator.cpp:52
void Initialize(uint8_t *pMemoryStart, size_t elemetSizeBytes, size_t numberOfElemets)
Definition UObjectAllocator.cpp:24
void AllocatePermanentObjectPool(int32_t InPermanentObjectPoolSize)
Definition UObjectAllocator.cpp:16
FORCEINLINE bool ResidesInPermanentPool(const UObjectBase *Object) const
Definition UObjectAllocator.h:137
Low level implementation of UObject, should not be used directly in game code Taken from UE's UObject...
Definition UObjectBase.h:34
Definition UObjectAllocator.h:31
Definition UObjectAllocator.h:60