From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) Message-Id: <10108201420.AA17274@clio.rice.edu> Subject: Re: Selector exhaustion code update To: pavenis AT lanet DOT lv Date: Mon, 20 Aug 2001 09:20:38 -0500 (CDT) Cc: djgpp-workers AT delorie DOT com In-Reply-To: <3B814236.25030.DEFA70@localhost> from "pavenis@lanet.lv" at Aug 20, 2001 05:00:38 PM X-Mailer: ELM [version 2.5 PL2] Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > > > Other suggestion: > > > > > > move 'char desc_map[how_deep]' inside > > > if (workaround_descriptor_leaks) > > > block. > > > > Can't do this since there are two workaround_descriptor_leaks blocks, > > one to set the map, then we exit it (to call direct_exec), then a > > second one to use the map. > > We can is we duplicate call to direct_exec_tail_1() inside that block. > The advatage is that we can set different initial values for > default_depth on Win9X (where scan is rather fast) and for > WinNT,2k,... where it is expected to be much slower. I would rather just increase the map size for all - after all we are talking about 50 or 100 bytes on the stack. Just because the map is allocated doesn't mean we have to use it for NT. > So the initial value should perhaps be smaller for WinNT. It can safely > be larger for Win9X. Maybe. If the hybrid search works, it won't hurt NT too much. One tuning factor is bad. Two are worse :-) > > I think you are convincing me to make the limit larger. One > > possible optimization is to use the lar scanning for NT also. > > If a selector was never touched it passes the lar test which > > is fast. > > It works only once per selector. So I think there is > little use of it. But let's say I'm scanning 100 selectors. If only the first 12 of them have been touched, I save 88 DPMI calls on the map creation and 88 DPMI calls on the release. This might be the magic that makes it almost as fast on NT an allows us to to larger scans.