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

Function reallocate

include/daScript/simulate/simulate.h:378–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376 }
377
378 __forceinline char * reallocate ( char * ptr, uint64_t oldSize, uint64_t size, const LineInfo * at ) {
379 auto aptr = heap->impl_reallocate(ptr, oldSize, size);
380 if ( !aptr && size ) throw_out_of_memory(false, size, at);
381 if ( instrumentAllocations ) onReallocate(ptr, oldSize, aptr, size, at ? *at : LineInfo());
382 return aptr;
383 }
384
385 __forceinline void free ( char * ptr, uint64_t size, const LineInfo * at = nullptr ) {
386 if ( instrumentAllocations ) onFree(ptr, at ? *at : LineInfo());

Callers

nothing calls this directly

Calls 2

impl_reallocateMethod · 0.80
LineInfoFunction · 0.70

Tested by

no test coverage detected