checkspace(i, "send");
  private void send (int event) {    // at this point, we've filled the tiles with data    // however, we don't know the size of the space    // Calculate the highest indexed tile used so far, and update the subspace    VM_Address start = subspace.getStart();    int required = countTileNum(start, maxAddr, blockSize);    int current = subspace.getBlockNum();    if (required > current || maxAddr != subspace.getEnd()) {      subspace.reset(start, maxAddr, 0, required);      allTileNum = required;      space.resize(allTileNum);      setTilenames(allTileNum);    }        // start the communication    space.startComm();    int numTiles = allTileNum;       //Log.writeln("TreadmillDriver: sending, allTileNum=", numTiles);       // (1) Used Space stream   // send the stream data    space.stream(LOS_USED_SPACE_STREAM, numTiles);    for (int i = 0; i < numTiles; ++i) {      checkspace(i, "send");      space.streamIntValue(tiles[i].usedSpace);    }    space.streamEnd();    // send the summary data     space.summary(LOS_USED_SPACE_STREAM, 2 /*items to send*/);    space.summaryValue(totalUsedSpace);    space.summaryValue(subspace.getEnd().diff(subspace.getStart()).toInt());    space.summaryEnd();    // (2) Objects stream    space.stream(LOS_OBJECTS_STREAM, numTiles);    for (int i = 0; i < numTiles; ++i) {      space.streamShortValue(tiles[i].objects);    }    space.streamEnd();    space.summary(LOS_OBJECTS_STREAM, 1);    space.summaryValue(totalObjects);    space.summaryEnd();       // send the control info    // all of space is USED    controlValues(tiles, AbstractTile.CONTROL_USED,		  subspace.getFirstIndex(),		  subspace.getBlockNum());    space.controlEnd(numTiles, tiles);             // send the space info    VM_Offset size = subspace.getEnd().diff(subspace.getStart());    sendSpaceInfoAndEndComm(size);  }