Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rlgvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.lang.c Subject: Re: sizeof Message-ID: <411@rlgvax.UUCP> Date: Fri, 1-Feb-85 17:34:27 EST Article-I.D.: rlgvax.411 Posted: Fri Feb 1 17:34:27 1985 Date-Received: Sun, 3-Feb-85 09:41:41 EST References: <7904@brl-tgr.ARPA> Organization: CCI Office Systems Group, Reston, VA Lines: 29 > Someone also said that ptr's to different objex may be different sizes. > Where & why? Where: On a Zilog 8000 running in segmented mode (24-bit pointers). On a Motorola 68000. On an Intel 802*8[68] running large-model code. Just because a machine supports large pointers doesn't mean that it supports 32-bit arithmetic well. The Z8000 probably does 32-bit arithmetic 16 bits at a time. The 68000 definitely does, and can't do 32-bit multiplies or divides conveniently at all. Why: Because it doesn't say anywhere that you can't. Because you may not want to pay the penalty for 32-bit arithmetic. > I realize that a certain machine may desire this to make implementation > as efficient as possible, but I think the designers should just bite > the bullet and make all ptr's the same size. On this point, I agree. 16-bit "int"s make techniques like using "malloc" and "realloc" to grow a large table (used by such obscure programs as "nm") lose big. Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy