chap file processing and external sorting tents must then issue readblock request to read the data from disk into the bufferand then getdatapointer request to gain direct access to the buffer' data contents /*improved adt for buffer pools using the buffer-passing style most user functionality is in the buffer classnot the buffer pool itself */* single buffer in the buffer pool *public interface bufferadt /*read the associated block from disk (if necessaryand return pointer to the data *public byte[readblock()/*return pointer to the buffer' data array (without reading from disk*public byte[getdatapointer()/*flag the buffer' contents as having changedso that flushing the block will write it back to disk *public void markdirty()/*release the block' access to this buffer further accesses to this buffer are illegal *public void releasebuffer()/*the bufferpool *public interface bufferpooladt /*relate block to bufferreturning pointer to buffer object *buffer acquirebuffer(int block)clearlythe buffer-passing approach places more obligations on the user of the buffer pool these obligations include knowing the size of blocknot corrupting the buffer pool' storage spaceand informing the buffer pool both when block has been modified and when it is no longer needed so many obligations make this approach prone to error an advantage is that there is no need to do an extra copy step when getting information from the user to the buffer if the size of the records stored is smallthis is not an important consideration if the size of the records is large (especially if the record size and the buffer size are the sameas typically is the case when implementing -treessee section )then this efficiency issue might become important note however that the in-memory copy time will always be far less than the time required to write the contents of buffer to disk for applications