UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
popmal.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#ifndef __POPMALH__
3#define __POPMALH__
4
5#ifndef __RADRR_COREH__
6 #include "rrCore.h"
7#endif
8
9#define Round32( num ) ( ( ( num ) + 31 ) & ~31 )
10
11#define PushMallocBytesForXPtrs( X ) ( ( X * sizeof(void*) ) + ( X * sizeof(U64) ) + 64 )
12
13
14#ifdef WRAP_PUBLICS
15#define rfmerge3(name,add) name##add
16#define rfmerge2(name,add) rfmerge3(name,add)
17#define rfmerge(name) rfmerge2(name,WRAP_PUBLICS)
18#define pushmallocinit rfmerge(pushmallocinit)
19#define pushmalloc rfmerge(pushmalloc)
20#define pushmalloco rfmerge(pushmalloco)
21#define popmalloctotal rfmerge(popmalloctotal)
22#define popmalloc rfmerge(popmalloc)
23#endif
24
25
27RADDEFFUNC void RADLINK pushmalloc( void * base, void * ptr, U64 amt );
28
29// ptr is an offset within the final allocation that will be popped (for allocating ptrs within a structure that you allocate with popmalloc)
30RADDEFFUNC void RADLINK pushmalloco(void* base, void * ptr,U64 amt);
31
33
34RADDEFFUNC void * RADLINK popmalloc( void * base, U64 amt, void* (*allocator)(UINTa bytes));
35
36#define popfree(ptr, memfree) memfree(ptr)
37
38#endif // __POPMALH__
RAD_U32 U32
Definition egttypes.h:501
RAD_UINTa UINTa
Definition egttypes.h:531
#define RADLINK
Definition egttypes.h:289
RAD_U64 U64
Definition egttypes.h:511
#define RADDEFFUNC
Definition egttypes.h:66
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
RADDEFFUNC void RADLINK pushmalloco(void *base, void *ptr, U64 amt)
Definition popmal.c:63
RADDEFFUNC void RADLINK pushmallocinit(void *base, U32 num_ptrs)
Definition popmal.c:25
RADDEFFUNC void RADLINK pushmalloc(void *base, void *ptr, U64 amt)
Definition popmal.c:39
RADDEFFUNC U64 RADLINK popmalloctotal(void *base)
Definition popmal.c:70
RADDEFFUNC void *RADLINK popmalloc(void *base, U64 amt, void *(*allocator)(UINTa bytes))
Definition popmal.c:77