Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!sri-unix!hplabs!sdcrdcf!burdvax!bpa!cbmvax!hutch!rabbit1!barber From: barber@rabbit1.UUCP (Steve Barber) Newsgroups: net.unix-wizards Subject: Re: Microport Unix -- Large Model Problems Message-ID: <245@rabbit1.UUCP> Date: Sat, 1-Nov-86 15:33:11 EST Article-I.D.: rabbit1.245 Posted: Sat Nov 1 15:33:11 1986 Date-Received: Tue, 4-Nov-86 01:31:26 EST References: <188@vsedev.VSE.COM> <401@maynard.UUCP> Distribution: net Organization: Rabbit Software Corp., Malvern PA Lines: 20 Keywords: Microport, Unix, Memory, Segmentation, lint Summary: Watch out for the use of NULL, too! In article <401@maynard.UUCP>, campbell@maynard.UUCP (Larry Campbell) writes: > In article <188@vsedev.VSE.COM> ron@vsedev.VSE.COM (Ron Flax) writes: > >Has anyone else out there been experiencing problems with porting > >programs to Microport Unix V/AT that fall into the large model category? > .... The most common problem I've found (especially from code > written on 68Ks and VAXen) is for people to not bother declaring pointer > valued objects: Another common problem is passing NULL as pointer argument. NULL is #defined as 0, which is 2 bytes. Large model pointers are 4 bytes, so the stack frame is now basically garbage. The solution is to cast the NULLs to the appropriate types. Ahhh..Intel..you can never be forgiven for making us have to worry about memory models (flames by mail only, please). -- Steve Barber Rabbit Software Corp. ...!ihnp4!{cbmvax,cuuxb}!hutch!barber ...!psuvax1!burdvax!hutch!barber (215) 647-0440 7 Great Valley Parkway East Malvern PA 19355