UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
syms_default_scratch.c
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#ifndef SYMS_DEFAULT_SCRATCH_C
4#define SYMS_DEFAULT_SCRATCH_C
5
7// NOTE(allen): Scratch
8
10
13 // init pool if first time
14 if (syms_scratch_pool.arenas[0] == 0){
15 for (SYMS_U64 i = 0; i < SYMS_ARRAY_SIZE(syms_scratch_pool.arenas); i += 1){
17 }
18 }
19
20 // grab local pointer
22
23 // get compatible arena
24 SYMS_Arena *result = 0;
25 {
27 for (SYMS_U64 i = 0; i < SYMS_ARRAY_SIZE(tctx->arenas); i += 1, arena_ptr += 1){
30 for (SYMS_U64 j = 0; j < conflict_count; j += 1, conflict_ptr += 1){
31 if (*conflict_ptr == *arena_ptr){
32 has_conflict = 1;
33 break;
34 }
35 }
36 if (!has_conflict){
37 result = *arena_ptr;
38 break;
39 }
40 }
41 }
42
43 return(result);
44}
45
46#endif //SYMS_DEFAULT_SCRATCH_C
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition syms_default_scratch.h:9
SYMS_Arena * arenas[2]
Definition syms_default_scratch.h:10
#define syms_arena_alloc
Definition syms_base.h:544
#define SYMS_ARRAY_SIZE(x)
Definition syms_base.h:144
SYMS_S32 SYMS_B32
Definition syms_base.h:99
uint64_t SYMS_U64
Definition syms_crt_overrides.h:39
#define SYMS_OVERRIDE_FUNC
Definition syms_crt_overrides.h:7
#define SYMS_Arena
Definition syms_default_arena.h:61
SYMS_THREAD_LOCAL SYMS_DefaultScratchPool syms_scratch_pool
Definition syms_default_scratch.c:9
SYMS_OVERRIDE_FUNC SYMS_Arena * syms_default_get_implicit_thread_arena(SYMS_Arena **conflicts, SYMS_U64 conflict_count)
Definition syms_default_scratch.c:12