📄 tr_mm_new_1.cc
字号:
// file: tr_mm_new_1.cc// // isip include files//#include "train_memory_manager.h"#include "train_memory_manager_constants.h"#include <train_trace.h>// method: new_trace_cc//// arguments: none//// return: a Train_Trace* pointer to a new trace//// this method outputs a new empty trace, and creates them whenever// necessary//Train_Trace* Train_Memory_manager::new_trace_cc() { // if there are no free traces available, create a few // if (trace_count_d == (int_4)0) { grow_trace_cc(); } // get a trace off the list // Train_Link_node* lnd = trace_list_d; trace_list_d = trace_list_d->get_next_cc(); // adjust link params // lnd->set_next_cc((Train_Link_node*)NULL); lnd->set_prev_cc((Train_Link_node*)NULL); // get the trace here // Train_Trace* trace = (Train_Trace*)(lnd->get_item_cc()); // return the link node to the free node list // delete_cc(lnd); // decrement free trace count // trace_count_d --; // return the trace and exit gracefully // return trace;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -