// file: mm_debug_0.cc
//
 
// isip include files
//
#include "memory_manager.h"
#include "memory_manager_constants.h"

// method: debug_cc
//
// arguments:
//  FILE* fp: (input) file pointer used for output
//  char_1* message: (input) a message concatenated to each debug message
//
// return: a logical_1 value indicating status
//
// this method displays the values of all internal data
//
logical_1 Memory_manager::debug_cc(FILE* fp_a, char_1* message_a) {

  // dump memory count parameters
  //
  fprintf(fp_a, "%s::%s: node_count_d = %ld\n", MM_CLASS_NAME,
	  message_a, node_count_d);
  
  // dump total memory count parameters
  //
  fprintf(fp_a, "%s::%s: num_node_d = %ld\n", MM_CLASS_NAME,
	  message_a, num_node_d);
  
  // dump memory block size parameters
  //
  fprintf(fp_a, "%s::%s: node_grow_size_d = %ld\n", MM_CLASS_NAME,
	  message_a, node_grow_size_d);
  
  // dump the data of the free links
  //
  Link_node* node = node_list_d;
  while (node != (Link_node*)NULL) {
    fprintf(fp_a, "%s::%s: node = %p\n", MM_CLASS_NAME, message_a, node);
    node->debug_cc(fp_a, message_a);
    node = node->get_next_cc();
  }
  
  // exit gracefully
  //
  return ISIP_TRUE;
}
