DragonFly BSD
DragonFly commits List (threaded) for 2005-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/lib/libc/sys tls.2


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Mar 2005 13:57:20 -0800 (PST)

    The poin is, guys, that sizeof(some_ridiculously_large_structure_or_array_
    which_is_as_large_as_the_processes_entire_address_space) is just plain
    ridiculous, and sizeof() should not have been made to return size_t
    for something so silly.  They could have added a usizeof() for the one
    in a million chance that someone actually needed something like that,
    but no... the idiots on the standard committee seem to believe that
    sizeof() is only EVER used in calls to read() or write(), verses, say,
    in generic exprssions that might, say, calculate an array index.

    for (i = 0; i < sizeof(ary)/sizeof(ary[0]); ++i) ...   now, should i
    be unsigned here, or an int?  it should be an int, plain and simple,
    for 99.99999% of the programs ever written.

    For the same reason, a TLS segment that is the size of the entire
    address space (or even 1/2 the entire address space), is also ridiculous.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]