One of GNU's original goals was eliminating arbitrary fixed size limits in UNIX tools, in exchange for using more memory. It's discussed in https://www.gnu.org/gnu/thegnuproject.en.html under "Technical goals".
> But it was natural to apply the known standards of good practice to the work—for example, dynamically allocating data structures to avoid arbitrary fixed size limits, and handling all the possible 8-bit codes wherever that made sense.
> In addition, we rejected the Unix focus on small memory size, by deciding not to support 16-bit machines (it was clear that 32-bit machines would be the norm by the time the GNU system was finished), and to make no effort to reduce memory usage unless it exceeded a megabyte.
"/bin/sh\0" or "\7\0/bin/sh" is less than 14 bytes, not more, even including a pointer or two
the real issue is that anything you try to allocate dynamically can fail, so you need a failure path, and your failure path needs to reliably free all the other dynamically allocated resources
early unix kind of sucked at handling failures
a fixed-size buffer isn't more efficient but it is simpler
ms-dos used cp/m's filesystem, which had fixed-size filename and ext fields, which i think it copied from rt-11, which i think got them from various pdp-8 systems
fixed-size string buffers make more sense on a word-oriented machine, or arguably in a filesystem, where pointers require some kind of hack
i'd like to blame radix50 but i don't think we can because then the limit would be 9.3 or 6.3 rather than 8.3. there have been some 6.3 filesystems (3 16-bit words per filename with rad50) but cp/m fat (and thus ms-dos) are not among them
thanks for the correction
https://www.informit.com/articles/article.aspx?p=25878&seqNu...
fat didn't have subdirectories in qdos or ms-dos pre-2 either
compaction doesn't require a lot of memory but it's slow and intrusive; it has to know where all your buffer pointers are
malloc on the pdp-11 never compacted of course
the filesystem supported 14 characters for the basename, but evidently we're talking about code with a 14-character limit on the pathname, not the basename
wasted memory due to heap fragmentation is very similar to wasted memory due to slack space in fixed-size structure fields
Looking at things like man utmp.5 should reveal what their thinking was.
One decade older hardware was better than newly released PDP-11...
Thankfully we have encyclopedias.