reset password
Author Message
Vanquish39
Posts: 134
Posted 00:30 May 20, 2012 |

Hi professor, is it alright If i add some info to each block for BufferManagerTest.  As in....

        Block blocks[] = new Block[10];
        for( int i = 0; i < blocks.length; ++i )
        {
            blocks[i] = new Block( "buffer.test", i );
            page.read(blocks[i]);
            page.setInt(0, i);
            page.setString(10, "Message from block: " + i);
            page.write(blocks[i]);
        }

 

It's easy to see everything when I get to print the bufferpool.

Thanks.

cysun
Posts: 2935
Posted 09:52 May 20, 2012 |

You don't need to have any content in these blocks. If printing buffer pool shows the block numbers, it's already enough to see how the replacement policy works.