// file: mm_size_0.cc
//

// isip include files
//
#include "memory_manager.h"
#include "memory_manager_constants.h"

// method: size_cc
//
// arguments: none
//
// return: an int_4 with number of bytes used by this object
//
// this method counts the size of the current object in bytes
//
int_4 Memory_manager::size_cc() {

  // set the size variable
  //
  int_4 size = (int_4)0;
  
  // add the size of each constituent data
  //
  size += sizeof(int_4);            // node_count_d  
  size += sizeof(int_4);            // num_node_d  
  size += sizeof(int_4);            // node_grow_size_d
  
  // add the sizes of the free links
  //
  Link_node* node = node_list_d;
  if (node_count_d > (int_4)0) {
    size += node_count_d * node->size_cc();
  }
  
  // exit gracefully
  //
  return size;
}
