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

Method allocateFor

src/simulate/simulate.cpp:268–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266 // SimNode_ForBase
267
268 void SimNode_ForBase::allocateFor ( NodeAllocator * code, uint32_t t ) {
269 totalSources = t;
270 auto bytes = code->allocate( totalSources * ( sizeof(SimNode*) + sizeof(uint32_t)*2 ) );
271 sources = (SimNode **) (bytes);
272 strides = (uint32_t *) (bytes + totalSources * sizeof(SimNode *));
273 stackTop = (uint32_t *) (bytes + totalSources * sizeof(SimNode *) + totalSources * sizeof(uint32_t));
274 }
275
276 SimNode * SimNode_ForBase::copyNode ( Context & context, NodeAllocator * code ) {
277 SimNode_ForBase * that = (SimNode_ForBase *) SimNode_Block::copyNode(context, code);

Callers 1

visitMethod · 0.80

Calls 1

allocateMethod · 0.45

Tested by

no test coverage detected