From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Thu, 26 Nov 2015 08:31:59 -0800 To: 9fans@9fans.net Message-ID: In-Reply-To: <3175949A-26D0-4C4A-BB7D-4E5A3EA7F8B7@me.com> References: <20151125160347.GN20646@sigint.cs.purdue.edu> <79F2255E-5E76-43E8-83B3-0DFB2CD34AC7@bitblocks.com> <3175949A-26D0-4C4A-BB7D-4E5A3EA7F8B7@me.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Undefined Behaviour in C Topicbox-Message-UUID: 77cc40a8-ead9-11e9-9d60-3106f5b1d025 On Thu Nov 26 03:25:34 PST 2015, brantleycoile@me.com wrote: > Hi Bakul. Long time since our Bay Area plan 9 hacking sessions. I've avoided the valley all together for a year and a half now. Not quite long enough yet. > > I thought the same thing, using ~0 for nil, but realized two things. First, that's a valid address on the PDP11 where the convention developed. It's the unibus space. Second, ~0 + member offest is still in page zero. > > By the way, are there any structs more than 4K in Linux? Are there any in plan 9? since that 4k is really pagesz, on amd64 that would be 2mb. there's no compelling reason on 64-bit machines to start at the bottom instead of the middle. the answer to the question is yes, yes there are. by Biobufs are larger than the original, but they are normally 8k. ; cd /sys/src/cmd ; grep sizeof `{find .|grep acid}|sed 's/;$//g'|awk '$NF ~ /^[0-9][0-9]*$/ && $NF>4096' ./8l/acid6:sizeofBiobuf = 8272 ./8l/acid6:sizeof_4_ = 16384 ./8l/acid6:sizeof_5_ = 16384 ./acid/acid6:sizeofBiobuf = 8248 ./aux/vga/acid6:sizeofBiobuf = 49232 ./mk/acid:sizeofBiobuf = 8248 ./stats.acid:sizeofAuthRpc = 8216 ./stats.acid:sizeofEvent = 8368 ./6l/acid6:sizeofBiobuf = 8272 ./6l/acid6:sizeof_4_ = 16384 ./6l/acid6:sizeof_5_ = 16384 this is not an exhaustive list. - erik