📄 mm_new_1.cc
字号:
// file: mm_new_1.cc// // isip include files//#include "memory_manager.h"#include "memory_manager_constants.h"#include <trace.h>// method: new_trace_cc//// arguments: none//// return: a Trace* pointer to a new trace//// this method outputs a new empty trace, and creates them whenever// necessary//Trace* 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 // Link_node* lnd = trace_list_d; trace_list_d = trace_list_d->get_next_cc(); // adjust link params // lnd->set_next_cc((Link_node*)NULL); if (trace_list_d != (Link_node*)NULL) { trace_list_d->set_prev_cc((Link_node*)NULL); } // get the trace here // Trace* trace = (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 + -