MCPcopy Create free account
hub / github.com/devosoft/avida / Allocate_Random

Method Allocate_Random

avida-core/source/cpu/cHardwareCPU.cc:1688–1696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1686}
1687
1688bool cHardwareCPU::Allocate_Random(cAvidaContext& ctx, const int old_size, const int new_size)
1689{
1690 m_memory.Resize(new_size);
1691
1692 for (int i = old_size; i < new_size; i++) {
1693 m_memory[i] = m_inst_set->GetRandomInst(ctx);
1694 }
1695 return true;
1696}
1697
1698bool cHardwareCPU::Allocate_Default(const int new_size)
1699{

Callers

nothing calls this directly

Calls 2

GetRandomInstMethod · 0.80
ResizeMethod · 0.45

Tested by

no test coverage detected