MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Allocate

Method Allocate

Source/Engine/Platform/Web/WebPlatform.cpp:92–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90#if 0
91
92void* WebPlatform::Allocate(uint64 size, uint64 alignment)
93{
94 void* ptr = nullptr;
95 if (alignment && size)
96 {
97 // Alignment always has to be power of two
98 ASSERT_LOW_LAYER((alignment & (alignment - 1)) == 0);
99 ptr = emscripten_builtin_memalign(alignment, size);
100 if (!ptr)
101 OutOfMemory();
102#if COMPILE_WITH_PROFILER
103 OnMemoryAlloc(ptr, size);
104#endif
105 }
106 return ptr;
107}
108
109void WebPlatform::Free(void* ptr)
110{

Callers 6

GraphicsDumpingMethod · 0.45
AddMethod · 0.45
DrawEmittersGPUFunction · 0.45
SetIconMethod · 0.45
ReadAllBytesMethod · 0.45
CookCollisionMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected