Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!ut-sally!ut-emx!jjr From: jjr@ut-emx.UUCP (Jeff Rodriguez) Newsgroups: comp.lang.c Subject: Re: Dynamic multidimensional arrays Message-ID: <3365@ut-emx.UUCP> Date: 16 Jun 88 03:23:03 GMT References: <10655@agate.BERKELEY.EDU> <1857@hubcap.UUCP> <10023@ames.arc.nasa.gov> <10032@ames.arc.nasa.gov> <59@cubsun.BIO.COLUMBIA.EDU> <4556@haddock.ISC.COM> Reply-To: jjr@ut-emx.UUCP (Jeff Rodriguez) Organization: Dept. of Elec. Engr.; U. of TX at Austin Lines: 11 In article <4556@haddock.ISC.COM> karl@haddock.ima.isc.com (Karl Heuer) writes: >If you allocate the entire array (including space for the pointers as well as >the contents) in a single chunk, then you don't need all those free_array() >routines -- the standard free() will work. I've written it this way. Quite true. Another benefit is that the one can use one call to fread() to read a binary image from a file directly into one of these arrays. If each row is allocated with a separate call to malloc(), then the resulting array must be filled one row at a time. Jeff Rodriguez jjr@emx.utexas.edu