cvs commit: src/sys/sys syslimits.h src/lib/libc/gen ttyname.c
Matthew Dillon
dillon at apollo.backplane.com
Tue Aug 23 13:30:51 PDT 2005
:
: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.
:
:Joerg
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.
-Matt
Matthew Dillon
<dillon at xxxxxxxxxxxxx>
More information about the Commits
mailing list