Message 72

Re: Scan problem

X-Added: With Flames (bblib $Revision: 1.4 $)
Return-path: <spapadim+@cs.cmu.edu>
X-Andrew-Authenticated-as: 0;andrew.cmu.edu;Network-Mail
Received: from po0.andrew.cmu.edu via trymail for bb+academic.cs.15-721@andrew.cmu.edu
          ID </afs/andrew.cmu.edu/usr0/bb/Mailbox/EvkU9JW00UdY84q04J>;
          Mon,  8 Oct 2001 15:45:25 -0400 (EDT)
Received: from mx3.andrew.cmu.edu (MX3.ANDREW.CMU.EDU [128.2.10.113])
        by po0.andrew.cmu.edu (8.9.3/8.9.3) with ESMTP id PAA01236
        for <bb+academic.cs.15-721@ams.andrew.cmu.edu>; Mon, 8 Oct 2001 15:45:25 -0400 (EDT)
Received: from iluvatar.dhs.org (pool-151-201-19-40.pitt.east.verizon.net [151.201.19.40])
        by mx3.andrew.cmu.edu (8.12.0.Beta16/8.12.0.Beta16) with ESMTP id f98JjNbT013720;
        Mon, 8 Oct 2001 15:45:24 -0400
Received: from cs.cmu.edu (iluvatar.hobbiton.cmu.edu [192.168.0.2])
        by iluvatar.dhs.org (Postfix) with ESMTP
        id 57BDF20515; Mon,  8 Oct 2001 15:45:20 -0400 (EDT)
Message-ID: <3BC2024F.7070607@cs.cmu.edu>
Date: Mon, 08 Oct 2001 15:45:19 -0400
From: Spiros Papadimitriou <spapadim+@cs.cmu.edu>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010808
X-Accept-Language: en-us
MIME-Version: 1.0
To: Neal Burns <nburns@andrew.cmu.edu>
Cc: bb+academic.cs.15-721@andrew.cmu.edu, deepay+@cs.cmu.edu
Subject: Re: Scan problem
References: <Pine.LNX.3.96L.1011008152514.11546A-100000@surreal>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Quick fix: there is now a (protected) default constructor in
Scan that does no initialization...   Admiteddly, Scan should
ideally be changed into an abstract base iterator class (which
could have been re-used in HFPage) and separated from
the Minibase implementation, but this should now work...

Spiros

Neal Burns wrote:

>This is a real problem. I tried unpinning the first page in the file from
>my Scan2 class's constructor, and this didn't help. Did you have any luck,
>Deepayan?
>
>Neal
>
>On Mon, 8 Oct 2001, Deepayan Chakrabarti wrote:
>
>>now it compiles, but there's another problem. MyScan::MyScan has to call
>>Scan::Scan, which ends up pinning 2 pages. MyScan doesnt unpin these 2
>>pages because of which we have 2 pinned pages at the end of the Scan. So
>>heap_driver.C complains.
>>  I am assuming the 2 pinned pages are: the first directory page, and the
>>page containing the first actual record. So in MyScan::MyScan, I'll try
>>unpinning these two... I hope that works.
>>
>> -deepay
>>
>>
>> On Sun, 7 Oct 2001, Spiros Papadimitriou wrote:
>>
>>>Two minor updates to the code were made early this afternoon, which you
>>>may already have noticed:
>>>
>>>- The Scan methods have been turned virtual.  On your part, you should
>>>  update the declarations in your scan implementation (ie. add "virtual" to
>>>  the destructor and the other two public methods).
>>>
>>>- The pin test (right after openScan() returns) has been removed.  If your
>>>  code passed before, it will still pass (no test was changed or added), so
>>>  it does not affect you.
>>> 
>>>Spiros
>>>
>>>
>>>
>>>
>>
>
>