Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!ames!ncar!ico!ism780c!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.std.c Subject: Re: size_t Message-ID: <13845@haddock.ima.isc.com> Date: 26 Jun 89 23:17:45 GMT References: <934@tukki.jyu.fi> <2284@ubc-cs.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 15 In article <2284@ubc-cs.UUCP> manderso@ugly.cs.ubc.ca (mark c anderson) writes: >size_t is defined as the "unsigned integral type of the result of the sizeof >operator", i.e. unsigned int (at least in this case). Which just means that (in the case of TC huge model) both |size_t| and |sizeof| are wrong. If the compiler allows you to create object larger than 65535 bytes, then |size_t| should not be a 16-bit type. >I'm not sure how Turbo C handles the huge memory model, but I was interested >to read how Microsoft deals with it: if you cast the result of a sizeof >operation on a huge array to unsigned long, the correct result is produced. A hollow voice says, "Kludgh". Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint