Artifacts Associated With Ticket 689100ffffffffff
Ticket change [68e91b338a] (rid 103146) by xtifr on 2003-02-18 22:58:32:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I briefly brough this up on tcl-core. On Unix(like) systems, way too much memory is being allocated for per-thread structures. Basically, some storage is allocated for a filename returned from dirent(), but the amount of space allocated is enough for a full pathname, when only enough for a filename is required. In other words, "PATH_MAX" is used where "NAME_MAX" is what was wanted. The difference is about 3.75k/thread on my Linux box, and might be worse on other systems. Furthermore, POSIX allows a system to not define PATH_MAX if it doesn't have a pathname limit. The Hurd is such a system, so this code breaks on The Hurd (which shouldn't be a major problem, since the code is wrong to begin with). I'm attaching the patch I wrote for Debian's Tcl8.4 package. Comments, criticism and questions welcomed.
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "xtifr"
- subsystem initialized to: "49. Threading"
- title initialized to: "too much per-thread memory/hurd breakage"
- type initialized to: "Bug"
Ticket change [068b0342cc] (rid 89240) by xtifr on 2003-02-19 06:02:02:
- icomment:
File Added - 42819: thread_memory_patch
- login: "xtifr"
- mimetype: "text/plain"
- username: "xtifr"
- icomment:
Add attachment "thread_memory_patch" [67fef20a21] (rid 102992) by xtifr on 2003-02-19 06:02:02.
Ticket change [0992f2a09b] (rid 113680) by hobbs on 2003-02-20 07:43:52:
- closedate changed to: "2003-02-20T00:43:52"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 I had to correct this with the attached patch to the patch which ensures that we have some value defined. Solaris was otherwise choking (it has the BSD-style MAXNAMLEN). Patched in 8.4.2.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "hobbs"
Ticket change [e4cda9b9e0] (rid 88021) by hobbs on 2003-02-20 07:43:53:
- icomment:
File Added - 42928: namemax.patch
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Add attachment "namemax.patch" [6f14f254a1] (rid 100251) by hobbs on 2003-02-20 07:43:53.
Ticket change [e16e2f1390] (rid 87446) by xtifr on 2003-02-20 08:18:24:
- closedate changed to: "2003-02-20T01:18:24"
- closer changed to: "xtifr"
- icomment:
Logged In: YES user_id=25775 Cool, that's much cleaner, thanks. In the future, it might be nice to add a configure test to see if *any* extra memory is required (which it is on solaris, but isn't on glibc-based systems like linux and hurd), but this is definitely good enough for now.
- login: "xtifr"
- mimetype: "text/plain"
- username: "xtifr"