mm_new_1.cc

来自「这是处理语音信号的程序」· CC 代码 · 共 57 行

CC
57 行
字号
// 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 + =
减小字号Ctrl + -
显示快捷键?