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

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

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Aug 2005 13:30:40 -0700 (PDT)

:On Tue, Aug 23, 2005 at 10:44:24AM -0700, Matthew Dillon wrote:
:>   Add a TTY_PATH_MAX limit, set to 256, and reduce the size of the ttyname
:>   static buffer from 1024 to a more reasonable TTY_PATH_MAX.
:What do you worry about? A few bytes in statically linked program? A few
:bytes for dynamically linked programs? In both cases, the change should
:be initialisation of static_buf at the time of first use, making it go
:to BSS by default.
:The change just adds/keeps an undocumented, arbitrary limit in libc.
:This is a *path name*, so it should be limited by the name of path names
:and nothing else.

    This isn't a few bytes, this is 768 unnecessary extra bytes.  We are
    not reserving a kilobyte just for a tty name buffer.  It's a ridiculous
    and unnecessary waste of memory.

					Matthew Dillon 

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