Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.lang.c Subject: Re: Block Initialization Message-ID: <3965@umcp-cs.UUCP> Date: Tue, 21-Oct-86 23:58:15 EDT Article-I.D.: umcp-cs.3965 Posted: Tue Oct 21 23:58:15 1986 Date-Received: Wed, 22-Oct-86 22:14:07 EDT References: <586@calma.UUCP> <4510@brl-smoke.ARPA> Reply-To: chris@umcp-cs.UUCP (Chris Torek) Distribution: na Organization: University of Maryland, Dept. of Computer Sci. Lines: 16 Summary: bzero is not always bad >>The chore is to initialize the entire structure to zero. How do I do it? In article <4510@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >The wrong way is to use bzero(), which fills a region with 0 bytes >.... Structure assignment is fine in most cases, but suppose instead that some hapless programmer is supposed to initialise a 40K-byte structure using a small model compiler on an IBM PC? There is no space for a second copy of the structure. Using bzero() here (assuming it exists, or after writing it) is reasonable, given the compiler limitations. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu