Path: utzoo!utgpu!water!watmath!clyde!ima!spdcc!gubba!rms From: rms@gubba.SPDCC.COM (Rich Sands) Newsgroups: comp.unix.xenix Subject: Re: Does anyone have a working '286 pathalias? Message-ID: <481@gubba.SPDCC.COM> Date: 23 Jul 88 02:55:30 GMT References: <333@ateng.UUCP> Reply-To: rms@gubba.UUCP (Rich Sands) Organization: Richard Sands, Brookline, MA. Lines: 43 In article <333@ateng.UUCP> chip@ateng.UUCP (Chip Salzenberg) writes: >Several people have complained that their copies of pathalias for the '286 >have suddenly stopped working. I am in the same boat. > >Does there exist in the world a set of pathalias sources for the '286 that >can correctly process the latest world maps without dumping core? > >PLEASE, let us know! >-- >Chip Salzenberg or >A T Engineering My employer may or may not agree with me. > You make me wanna break the laws of time and space > You make me wanna eat pork The world maps have gotten so large that the hash table within pathalias must be larger than 64k. It is malloced as a contiguous array, and so when the program calls malloc with some number larger than 64k, malloc gives back a block of memory that is - 64k big. Pathalias thinks its got a big chunk of memory and after awhile, does an array access that causes a segmentation violation. The solution is to go through pathalias and replace every reference to the hash table to a function call, and make the table into two separate arrays when it must be larger than 64k, with the function call grabbing the appropriate array element from one of the two arrays. This technique can be extended to as many pieces as are necessary (though it will be awhile before a third array is needed in pathalias, I would guess). I have done this, as well as changed some constants involving hash table utilization to favor space efficiency over speed. The large array trick I mentioned above further slows the program and is a disgusting hack, but who cares - it runs at 3:00 am when the machine has nothing else better to do. My changes work on an AT&T 6300+ running Simultask (Sys V). I've never tried it under Xenix so your milage may vary. If you want the patches, drop me a line and I'll send them. If I get enough response, I'll post. -- -- rms UUCP: {ihnp4,harvard,husc6,linus,ima,bbn,m2c}!spdcc!gubba!rms Internet: rms@gubba.spdcc.com Compuserve: 71360,1067 BIX: richsands