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

Function allocateString

include/daScript/simulate/simulate.h:390–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388 }
389
390 __forceinline char * allocateString ( const char * text, uint64_t length, const LineInfo * at, bool tempString = false ) {
391 auto astr = stringHeap->impl_allocateString(this, text, length, at);
392 if ( !astr && length ) throw_out_of_memory(true, length+1, at);
393 if ( instrumentAllocations ) onAllocateString(astr, length, tempString, at ? *at : LineInfo());
394 return astr;
395 }
396
397 __forceinline char * allocateString ( const string & str, const LineInfo * at, bool tempString = false ) {
398 auto astr = stringHeap->impl_allocateString(this, str.c_str(), uint64_t(str.size()), at);

Callers 3

collectHeapMethod · 0.85
preVisitMethod · 0.85
allocateTempStringFunction · 0.85

Calls 4

LineInfoFunction · 0.70
impl_allocateStringMethod · 0.45
c_strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected