The RubySystem flag no_mem_vec will disable Ruby from allocating it's memory
data array.
m_entries = new Directory_Entry*[m_num_entries];
for (int i=0; i < m_num_entries; i++)
m_entries[i] = NULL;
+ m_ram = g_system_ptr->getMemoryVector();
}
- m_ram = g_system_ptr->getMemoryVector();
-
m_num_directories++;
m_num_directories_bits = log_int(m_num_directories);
m_total_size_bytes += m_size_bytes;
tracer = Param.RubyTracer("");
stats_filename = Param.String("ruby.stats",
"file to which ruby dumps its stats")
+ no_mem_vec = Param.Bool(False, "do not allocate Ruby's mem vector");
g_eventQueue_ptr = new RubyEventQueue(p->eventq, m_clock);
g_system_ptr = this;
- m_mem_vec_ptr = new MemoryVector;
- m_mem_vec_ptr->setSize(m_memory_size_bytes);
+ if (p->no_mem_vec) {
+ m_mem_vec_ptr = NULL;
+ } else {
+ m_mem_vec_ptr = new MemoryVector;
+ m_mem_vec_ptr->setSize(m_memory_size_bytes);
+ }
//
// Print ruby configuration and stats at exit
delete m_network_ptr;
delete m_profiler_ptr;
delete m_tracer_ptr;
- delete m_mem_vec_ptr;
+ if (m_mem_vec_ptr != NULL) {
+ delete m_mem_vec_ptr;
+ }
}
void RubySystem::printSystemConfig(ostream & out)