Message 17

(Test II) Yes, BufMgr::free() is strange...

X-Added: With Flames (bblib $Revision: 1.4 $)
Return-path: <lw2j+@andrew.cmu.edu>
X-Andrew-Authenticated-as: 31049;andrew.cmu.edu;Leejay Wu
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/MvesV=K00Udf12f040>;
          Fri, 21 Sep 2001 14:34:51 -0400 (EDT)
Received: from unix2.andrew.cmu.edu via qmail
          ID </afs/andrew.cmu.edu/service/mailqs/q001/QF.IvesU9C00Uj:E1clkU>;
          Fri, 21 Sep 2001 14:33:46 -0400 (EDT)
Received: from unix2.andrew.cmu.edu via qmail
          ID </afs/andrew.cmu.edu/usr9/lw2j/.Outgoing/QF.YvesU9600Uj:8ub10V>;
          Fri, 21 Sep 2001 14:33:45 -0400 (EDT)
Received: from mms.4.60.Jul.16.2001.15.09.31.sun4.57.EzMail.2.0.CUILIB.3.45.SNAP.NOT.LINKED.unix2.andrew.cmu.edu.sun4x.57
          via MS.5.6.unix2.andrew.cmu.edu.sun4_57;
          Fri, 21 Sep 2001 14:33:45 -0400 (EDT)
Message-ID: <MvesU9600Uj_0ub0tw@andrew.cmu.edu>
Date: Fri, 21 Sep 2001 14:33:45 -0400 (EDT)
From: Leejay Wu <lw2j+@andrew.cmu.edu>
X-Andrew-Message-Size:     700+0
Content-Type: text/plain
If-Type-Unsupported: alter
To: Andrew BBoard Account <bb+academic.cs.15-721@andrew.cmu.edu>
Subject: (Test II) Yes, BufMgr::free() is strange...
Cc: 

Y'all may have noticed that Test 2 tries to free singly-pinned pages,
expecting success.

The solution actually does allow this -- basically, if it's pinned
ONCE, the page gets unpinned and then removed from the hash, et al,
but if it's pinned twice or more, an error occurs.

It's not the best behavior, in terms of having simple functions 
that do the minimum possible (free() not unpinning, for instance),
but it wouldn't surprise me if this were assumed by large parts of 
Minibase.  *frown*

-- 
|   lw2j@cs.cmu.edu        | #include <0.0648g NaCl>     |              
|--------------------------|-----------------------------|  
|   #include <stddiscl.h>  | Spam returned to postmaster |