void main_cleanup() {
  int i;
  if (display_histogram) {
    write_int(gc(0, 0, 2));
    printf(" available cells");
    writeln();

    // histogram of opcodes
    for (i = 0; i < 112; i++) {
      write_int(i);
      printf(" ");
      write_int(histogram[i]);
      writeln();
      hash_histogram(atomlist);
      writeln();
      hash_histogram(globals);
    }
  }
  return;
}

void cleanup_() {
  analyze_stack();
  main_cleanup();
  my_exit(0);
  return; // return not reached
}

//void stack_overflow() {
//  printf("stack overflow");
//  writeln();
//  cleanup_();
//  return;
//}
