cvs commit: src/sys/sys syslimits.h src/lib/libc/gen ttyname.c

Matthew Dillon dillon at apollo.backplane.com
Tue Aug 23 14:10:49 PDT 2005


:It is not ridiculous, because that is something an administrator might
:want to do. Reserving the memory doesn't hurt as long as it is not
:initialiased. So if you worry about that, don't initialise the variable
:at all, which would save ~200 bytes anyway.
:
:Joerg

    I find it highly unlikely that any administrator or any program
    using ttyname would ever expect the path to the tty to exceed 256
    characters, let alone 1024.

    Since the memory is not page-sized or page-aligned, it is almost
    certainly initialized as side effect of other BSS around it.

    I'm getting tired of arguing.  My final answer is NO, we are not reserving
    a 1024 byte buffer for ttyname.  We are using the same buffer size that
    we had originally, which was approximately 256 bytes.  You are going to
    have to live with it.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Commits mailing list