Complexity of reallocating storage (was users command crap)

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Tue Jan 29 14:19:49 AEST 1991


In article <6662 at exodus.Eng.Sun.COM> chased at rbbb.Eng.Sun.COM (David Chase) writes:
> I always double the size when I do this, by the way.

Then you are using poor programming techniques. No program should take
up half the memory of your machine when it could take up a fourth with
hardly any effort on the programmer's part.

Any single-pass ``users'' has to either use quadratic time or be a rude
abuser of resources. Why not use two passes and be done with it?

---Dan



More information about the Comp.bugs.4bsd.ucb-fixes mailing list