arrayUsedSpaceStream = new Stream( space,                                      SS_ARRAY_USED_SPACE_STREAM,                 StreamConstants.INT_TYPE,                   "Array Used Space stream",                  0,                                          blockSize,                                  0,                                          0,                                          "Space used by reference arrays: ",          " bytes",                                    StreamConstants.PRESENTATION_PERCENT,       StreamConstants.PAINT_STYLE_ZERO,           0,                                          Color.Blue);
scalarObjectsStream = new Stream(space, SS_SCALAR_OBJECTS_STREAM, StreamConstants.SHORT_TYPE, "Scalar Objects stream", 0,  maxObjectsPerBlock(blockSize) / 2, 0, 0, "No. of scalar and primitive array objects = ", " objects", StreamConstants.PRESENTATION_PLUS, StreamConstants.PAINT_STYLE_ZERO, 0, Color.Green);
  public ContiguousSpaceDriver                    (String name,                     Space sp,                     int blockSize,                     boolean mainSpace ) {    // Set up array of tiles for max possible use    this.blockSize = blockSize;    Address start = sp.getStart();    Extent extent = sp.getExtent();    int maxTileNum = countTileNum(extent, blockSize);    /*    Log.write("ContiguousSpaceDriver for ");    Log.write(name);    Log.write(", blocksize=", blockSize);    Log.write(", start=", start); Log.write(", extent=", extent);    Log.writeln(", maxTileNum=", maxTileNum);    */    tiles = new Tile[maxTileNum];    for(int i = 0; i < maxTileNum; i++)      tiles[i] = new Tile();    // Set up semispace. For now,  of zero length: the collector    // must call resize() before gathering data    //TODO do we need subspaces?    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(                    getNextServerSpaceId(), /* space id */                    name,                       /* server name */                    "MMTk ContiguousSpace GC",  /* driver (space) name */                    "Block ",                   /* space title */                    tmp,                        /* block info */                    maxTileNum,                 /* number of tiles */                    "UNUSED",                   /* the label for unused blocks */                    mainSpace                   /* main space */ );    setTilenames(subspace, 0);    // Initialise the Space's 4 Streams    scalarUsedSpaceStream           = new Stream(                     space,                                     /* the space */                     SS_SCALAR_USED_SPACE_STREAM,               /* space ID */                     StreamConstants.INT_TYPE,                  /* stream data type */                     "Scalar Used Space stream",                /* stream name */                     0,                                         /* min. data value */                     blockSize,                                 /* max. data value */                     0,                                         /* zero value */                     0,                                         /* default value */                    "Space used by scalars and primitive arrays: ",     /* value prefix */                    " bytes",                                   /* value suffix */                     StreamConstants.PRESENTATION_PERCENT,      /* presentation style */                     StreamConstants.PAINT_STYLE_ZERO,          /* paint style */                     0,                                         /* max stream index */                     Color.Red);                                /* tile colour */    arrayUsedSpaceStream           = new Stream(                     space,                                     /* the space */                     SS_ARRAY_USED_SPACE_STREAM,                /* space ID */                     StreamConstants.INT_TYPE,                  /* stream data type */                     "Array Used Space stream",                 /* stream name */                     0,                                         /* min. data value */                     blockSize,                                 /* max. data value */                     0,                                         /* zero value */                     0,                                         /* default value */                    "Space used by reference arrays: ",         /* value prefix */                    " bytes",                                   /* value suffix */                     StreamConstants.PRESENTATION_PERCENT,      /* presentation style */                     StreamConstants.PAINT_STYLE_ZERO,          /* paint style */                     0,                                         /* max stream index */                     Color.Blue);                               /* tile colour */    scalarObjectsStream = new Stream(                     space,                     SS_SCALAR_OBJECTS_STREAM,                     StreamConstants.SHORT_TYPE,                     "Scalar Objects stream",                     0,                     // Say, max value = 50% of max possible                     maxObjectsPerBlock(blockSize)/2,                     0,                     0,                     "No. of scalar and primitive array objects = ",                     " objects",                     StreamConstants.PRESENTATION_PLUS,                     StreamConstants.PAINT_STYLE_ZERO,                     0,                     Color.Green);   arrayObjectsStream = new Stream(                     space,                     SS_ARRAY_OBJECTS_STREAM,                     StreamConstants.SHORT_TYPE,                     "Array Objects stream",                     0,                     // Say, typical ref array size = 4 * typical scalar size?                     maxObjectsPerBlock(blockSize)/8,                     0,                     0,                     "No. of reference array objects = ",                     " objects",                     StreamConstants.PRESENTATION_PLUS,                     StreamConstants.PAINT_STYLE_ZERO,                     0,                     Color.Cyan);    space.resize(0);    // Initialise the statistics    zero();    scanner = new LinearScan(this);  }