MCPcopy Create free account
hub / github.com/axmolengine/axmol / Free

Method Free

3rdparty/box2d/src/common/b2_stack_allocator.cpp:65–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void b2StackAllocator::Free(void* p)
66{
67 b2Assert(m_entryCount > 0);
68 b2StackEntry* entry = m_entries + m_entryCount - 1;
69 b2Assert(p == entry->data);
70 if (entry->usedMalloc)
71 {
72 b2Free(p);
73 }
74 else
75 {
76 m_index -= entry->size;
77 }
78 m_allocation -= entry->size;
79 --m_entryCount;
80
81 p = nullptr;
82}
83
84int32 b2StackAllocator::GetMaxAllocation() const
85{

Callers 15

DestroyMethod · 0.45
~b2ContactSolverMethod · 0.45
DestroyMethod · 0.45
~b2IslandMethod · 0.45
DestroyMethod · 0.45
DestroyMethod · 0.45
DestroyMethod · 0.45
DestroyFixtureMethod · 0.45
DestroyMethod · 0.45
DestroyMethod · 0.45
DestroyBodyMethod · 0.45
SolveMethod · 0.45

Calls 1

b2FreeFunction · 0.85

Tested by

no test coverage detected