Path: utzoo!attcan!uunet!crdgw1!uakari.primate.wisc.edu!samsung!umich!yale!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: sizeof(struct) and padding Message-ID: <7366:Oct2520:41:3990@kramden.acf.nyu.edu> Date: 25 Oct 90 20:41:39 GMT References: <1229@sun13.scri.fsu.edu> <14309@goofy.megatest.UUCP> Organization: IR Lines: 13 In article <14309@goofy.megatest.UUCP> djones@megatest.UUCP (Dave Jones) writes: > When you write structures directly to disc, it is non-portable, > period -- whether or not you write the tail-padding. Different machines will > have different internal padding, even different data formats. Sometimes you have to manually swap memory to disk for efficiency. You're never going to use the temporary file on another machine, so the format doesn't have to be portable. All you need is a guarantee from the OS that memory can be written out and read back in without corruption. I agree that the original problem is best solved with a text format. ---Dan