Message 26

pinPage() and emptyPage != 0

X-Added: With Flames (bblib $Revision: 1.4 $)
Return-path: <akliger+@andrew.cmu.edu>
X-Andrew-Authenticated-as: 60293;andrew.cmu.edu;Aleksey Kliger
Received: from po7.andrew.cmu.edu via trymail for bb+academic.cs.15-721@andrew.cmu.edu
          ID </afs/andrew.cmu.edu/usr0/bb/Mailbox/IvfH03i00Udf1Q6U40>;
          Sat, 22 Sep 2001 20:42:43 -0400 (EDT)
Received: from unix12.andrew.cmu.edu via qmail
          ID </afs/andrew.cmu.edu/service/mailqs/q005/QF.UvfGz5O00UjII1l0FU>;
          Sat, 22 Sep 2001 20:41:41 -0400 (EDT)
Received: from unix12.andrew.cmu.edu via qmail
          ID </afs/andrew.cmu.edu/usr20/akliger/.Outgoing/QF.YvfGz5:00UjII1QUZm>;
          Sat, 22 Sep 2001 20:41:41 -0400 (EDT)
Received: from Messages.8.5.N.CUILIB.3.45.SNAP.NOT.LINKED.unix12.andrew.cmu.edu.sun4x.58
          via MS.5.6.unix12.andrew.cmu.edu.sun4_57;
          Sat, 22 Sep 2001 20:41:41 -0400 (EDT)
Message-ID: <MvfGz5_00UjIA1QUQG@andrew.cmu.edu>
Date: Sat, 22 Sep 2001 20:41:41 -0400 (EDT)
From: Aleksey Kliger <akliger+@andrew.cmu.edu>
X-Andrew-Message-Size: 615+0
Content-Type: text/plain
If-Type-Unsupported: alter
To: Andrew BBoard Account <bb+academic.cs.15-721@andrew.cmu.edu>
Subject: pinPage() and emptyPage != 0

What is the semantics of a call to pinPage with (emptyPage != 0) ?

Does this just mean "do everything you would normally do to pin a page,
except don't bother with the call to read_page(), because we know
that the page is empty"?
So does that mean that it's the Buffer Manager's responsibility to
return a Page* to a page that _is_ actually empty (as opposed to having
whatever random junk was in there from the last time that frame was
used))? Or can the buffer manager just return a Page* to whatever
frame it has around and assume that the caller will initialize the page
contents as she sees fit?

-- 
aleksey