MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / reset

Method reset

src/misc/memory_model.cpp:213–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211 }
212
213 void MemoryModel::reset() {
214 for ( auto & itb : bigStuff ) {
215#if DAS_SANITIZER
216 memset(itb.first, 0xcd, itb.second);
217 deletedBigStuff[itb.first] = itb.second;
218#else
219 FREE_INSANE_POINTER(itb.first);
220 das_aligned_free16(itb.first);
221#endif
222 }
223 bigStuff.clear();
224#if DAS_TRACK_ALLOCATIONS
225 if ( trackAllocations ) {
226 bigStuffId.clear();
227 bigStuffAt.clear();
228 bigStuffComment.clear();
229 }
230#endif
231 shoe.reset();
232 }
233
234 void MemoryModel::shrink() {
235 if constexpr (has_shrink_to_fit<decltype(bigStuff)>::value) {

Callers

nothing calls this directly

Calls 3

das_aligned_free16Function · 0.85
bytesAllocatedFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected