📄 mm_new_3.cc
字号:
// file: mm_new_3.cc// // isip include files//#include "memory_manager.h"#include "memory_manager_constants.h"#include <lattice_node.h>// method: new_lat_cc//// arguments: none//// return: a Lat* pointer to a new lattice node//// this method outputs a new empty lattice node, and creates them whenever// necessary//Lattice_node* Memory_manager::new_lat_cc() { // if there are no free lattice nodes available, create a few // if (lat_count_d == (int_4)0) { grow_lat_cc(); } // get a lattice node off the list // Link_node* lnd = lat_list_d; lat_list_d = lat_list_d->get_next_cc(); // adjust params // lnd->set_next_cc((Link_node*)NULL); if (lat_list_d != (Link_node*)NULL) { lat_list_d->set_prev_cc((Link_node*)NULL); } // get the lattice node here // Lattice_node* ltn = (Lattice_node*)(lnd->get_item_cc()); // return the link node to the free node list // delete_cc(lnd); // decrement free lattice node count // lat_count_d --; // return the lattice node and exit gracefully // return ltn;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -