public TreadmillDriver(String name, FreeListVMResource losVM, int blockSize, VM_Address start, VM_Address end, int size, int threshold, boolean mainSpace) {  this.losVM = losVM;   this.blockSize = blockSize; maxAddr = start; int maxTileNum = countTileNum(start, end, blockSize); tiles = new Tile[maxTileNum];  for(int i = 0; i < maxTileNum; i++) tiles[i] = new Tile();  subspace = new Subspace(start, start, 0, blockSize, 0); allTileNum = 0;   String tmp = (blockSize < 1024) ? "Block Size: " + blockSize + " bytes\n": "Block Size: " + (blockSize / 1024) + " bytes\n";    space = new ServerSpace( Plan.getNextServerSpaceId(),  name,                        "JMTk Treadmill Space", 	 "Block ",                    tmp,                   	 size,			 "UNUSED",                    mainSpace                    ); setTilenames(0);    usedSpaceStream = new Stream( space, 					 LOS_USED_SPACE_STREAM,			 StreamConstants.INT_TYPE,			 "Used Space stream",			 0, 					 blockSize,					 0, 					 0,						 "Space used: ", 				 " bytes",					 StreamConstants.PRESENTATION_PERCENT,	 StreamConstants.PAINT_STYLE_ZERO, 		 0,						 Color.Red);				   objectsStream = new Stream( space, LOS_OBJECTS_STREAM, StreamConstants.SHORT_TYPE, "Objects stream", 0, (int)(blockSize/threshold), 0, 0, "No. of objects = ", " objects", StreamConstants.PRESENTATION_PLUS, StreamConstants.PAINT_STYLE_ZERO, 0, Color.Green);   zero(); }
TreadmillDriver () {}
  public TreadmillDriver(String name,                         FreeListVMResource losVM,                         int blockSize,                         VM_Address start,                          VM_Address end,                         int size,                         int threshold,                         boolean mainSpace) {        this.losVM = losVM;    // Set up array of tiles for max possible use    //TODO blocksize should be a multiple of treadmill granularity    this.blockSize = blockSize;    maxAddr = start;    int maxTileNum = countTileNum(start, end, blockSize);    tiles = new Tile[maxTileNum];    //Log.writeln("TreadmillDriver: no of tiles=", maxTileNum);    for(int i = 0; i < maxTileNum; i++)      tiles[i] = new Tile();    subspace = new Subspace(start, start, 0, blockSize, 0);     allTileNum = 0;        // Set the block label    String tmp = (blockSize < 1024) ?                   "Block Size: " + blockSize + " bytes\n":                   "Block Size: " + (blockSize / 1024) + " bytes\n";        // Create a single GCspy Space    space = new ServerSpace(		    Plan.getNextServerSpaceId(), /* space id */		    name,                       /* server name */		    "JMTk Treadmill Space", 	/* driver (space) name */		    "Block ",                   /* space title */		    tmp,                   	/* block info */		    size,			/* number of tiles */		    "UNUSED",                   /* the label for unused blocks */		    mainSpace                   /* main space */ );    setTilenames(0);       // Initialise the Space's 2 Streams    usedSpaceStream            = new Stream(	             space, 					/* the space */		     LOS_USED_SPACE_STREAM,			/* space ID */		     StreamConstants.INT_TYPE,			/* stream data type */		     "Used Space stream",			/* stream name */		     0, 					/* min. data value */		     blockSize,					/* max. data value */		     0, 					/* zero value */		     0,						/* default value */		    "Space used: ", 				/* value prefix */		    " bytes",					/* value suffix */		     StreamConstants.PRESENTATION_PERCENT,	/* presentation style */		     StreamConstants.PAINT_STYLE_ZERO, 		/* paint style */		     0,						/* max stream index */		     Color.Red);				/* tile colour */   objectsStream = new Stream(	             space, 		     LOS_OBJECTS_STREAM,		     StreamConstants.SHORT_TYPE,		     "Objects stream",		     0, 		     (int)(blockSize/threshold),		     0, 		     0,		     "No. of objects = ", 		     " objects",		     StreamConstants.PRESENTATION_PLUS,		     StreamConstants.PAINT_STYLE_ZERO, 		     0,		     Color.Green);    // Initialise the statistics    zero();  }