package simpledb.buffer; import simpledb.file.*; import java.util.*; /** * Manages the pinning and unpinning of buffers to blocks. * @author Edward Sciore * */ class BasicBufferMgr { private Mapallocated = new HashMap(); private List unpinned = new LinkedList(); private int numAvailable; /** * Creates a buffer manager having the specified number * of buffer slots. * @param numbuffs the number of buffer slots to allocate */ BasicBufferMgr(int numbuffs) { numAvailable = numbuffs; for (int i=0; i