« Return to Thread: [rvm-research] Find holes in a block of SegregatedFreeListSpace

Re: [rvm-research] Find holes in a block of SegregatedFreeListSpace

by Dingwen Yuan :: Rate this Message:

Reply to Author | View in Thread

Sorry, I hit a space and the above mail was mistakenly sent. Again, the code is like this:

@Inline
private void auditBlock (Address block, int sizeClass,
            Extent blockSize) {
         
      Extent cellBytes = Extent.fromIntSignExtend(
cellSize[sizeClass]);
      Address cursor = block.plus(blockHeaderSize[sizeClass]);
      Address end = block.plus(blockSize);     
     
      while(cursor.LT(end)) {
        ObjectReference current = VM.objectModel.getObjectFromStartAddress(cursor);
        if (current == null || !this.isCellLive(current)) {
               holes++;
        }
        cursor = cursor.plus(cellBytes);
     }      
  }

I call this function to scan blocks in "available list" at the RELEASE phase of GC directly after space.release() was called. But I found there should be some bug in it, but cannot tell where. Could anyone help me with this?

Thanks in advance.

Dingwen

TU Darmstadt

2009/6/10 Dingwen Yuan <pdvyuan@...>
Hallo everyone,

I wrote the following code in SegregatedFreeListSpace(the super class of MarkSweepSpace) to find holes in a block.

@Inline
    private void auditBlock (Address block, int sizeClass,
            Extent blockSize) {
         
      Extent cellBytes = Extent.fromIntSignExtend(cellSize[sizeClass]);
      Address cursor = block.plus(blockHeaderSize[sizeClass]);
      Address end = block.plus(blockSize);     
     
    while(cursor.LT(end)) {
        ObjectReference current = VM.objectModel.getObjectFromStartAddress(cursor);
        if (current == null || !this.isCellLive(current)) {
               holes++;
        }
        cursor = cursor.plus(cellBytes);
    }       



------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

 « Return to Thread: [rvm-research] Find holes in a block of SegregatedFreeListSpace