Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!uwvax!astroatc!prairie!dan From: dan@prairie.UUCP (Daniel M. Frank) Newsgroups: net.unix-wizards Subject: Re: Microport Unix -- Large Model Problems Message-ID: <347@prairie.UUCP> Date: Mon, 3-Nov-86 09:32:33 EST Article-I.D.: prairie.347 Posted: Mon Nov 3 09:32:33 1986 Date-Received: Tue, 4-Nov-86 05:05:00 EST References: <188@vsedev.VSE.COM> <401@maynard.UUCP> <245@rabbit1.UUCP> Reply-To: dan@prairie.UUCP (Daniel M. Frank) Distribution: net Organization: Prairie Computing, Madison, Wisconsin Lines: 16 Keywords: Microport, Unix, Memory, Segmentation, lint In article <245@rabbit1.UUCP> barber@rabbit1.UUCP (Steve Barber) writes: >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. This isn't really true. Code in stdio.h for the SV/286 release checks your memory model, and if it is large, defines NULL to be 0L, which is the same size as a pointer. It doesn't please lint, so the best solution is still to cast it as appropriate (like (char *)0), but you ARE generally safe, as long as you include stdio.h. -- Dan Frank uucp: ... uwvax!prairie!dan arpa: dan%caseus@spool.wisc.edu