/*
	Runtime Engine
		By Craig Kadziolka ( Nov 1999 - Dec 2000 )

	Modifications and copying is permitted providing this header
	is retained
*/

#include "gc.h"
#include <string.h>

#define start_collection() garbage_collect()

struct hehehe * buf;

struct dlist {
	struct dlist *next;
};

struct dlist * head;

void Init()
{
	/* This test program doesnt use the distributed extensions */
}

int Main()
{

//  printf("Head of the list is at %u\n", &head);
//  printf("Next of the list is at %u\n", &head->next);
 
	int *k;
	
	GC_init();

  	head = (struct dlist *) alloc (sizeof(struct dlist));
  	head->next = (struct dlist *) alloc (sizeof(struct dlist));
  	//head->next->prev = head;

	k = (int *) alloc (50);
	printf("k at %d\n");
	
	head->next = NULL;
      	
	/*  garbage_collect();  Use the multithreaded version of this.*/
	start_collection();    

	start_collection();
	
	exit (0); /* Only explicit termination is supported */
	return 0;
}



