From mboxrd@z Thu Jan 1 00:00:00 1970 From: lm@mcvoy.com (Larry McVoy) Date: Fri, 27 Nov 2015 16:03:56 -0800 Subject: [TUHS] tool (that wnj wrote?) that reduced the data segment size? In-Reply-To: References: <20151127222652.GA21698@mcvoy.com> Message-ID: <20151128000356.GC21698@mcvoy.com> On Sat, Nov 28, 2015 at 10:44:58AM +1100, Dave Horsfall wrote: > On Fri, 27 Nov 2015, Larry McVoy wrote: > > > I've gotten sucked into an embedded system project and they are running > > out of memory. I have a vague memory of some sort of tool that I think > > Bill Joy wrote (or maybe he told me about it) that would do some magic > > processing of all the string constants and somehow it de-dupped the > > space. > > > > Though now that I'm typing this that doesn't seem possible. Does this > > ring a bell with anyone? I'm sure it was for the PDP 11 port. > > I think you're referring to an abomination called "xstrings" (or "xstr"?). Yup, that's it. Cool, thanks. > It was described by a colleague of mine as "about as subtle as a car > crash"; it worked by comparing strings at compilation time, even unto the > tails of said strings. > > Woe betide the user if any string was changed at run time... I get it. I also get that I have 32KB of RAM and I'm down to my last 1.2KB. --lm