lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Apr 19, 2014 4:38 PM, "Sean Conner" <sean@conman.org> wrote:

>   alloca() is not standard.  It's a compiler hack that is found on several
> copilers (you can't write the function at all---it *has* to be a compiler
> hack).

In the old days, compilers were more hobbled by calling conventions and stuff like frame pointers. There were alloca implementations which would abuse knowledge of stack layout; the big thing was whether the stack grew upward or downward.

Doug Gwyn wrote an implementation for systems for which the answer to "up or down" was "no". This is just more evidence of how badly people wanted to use Crays for Unix, and just how addicted emacs weenies were.

http://www.opensource.apple.com/source/gnudiff/gnudiff-10.2/diffutils/alloca.c

More emacs: "unexec" produced a snapshot of a running emacs by loading up all the .el files into memory and then abort()ing, dumping core. Various hacks turned the core dump back into an executable. It was much, much faster to run the executable than to read a lot of little files.

Remember "EMACS: Eight Megs And Constantly Swapping"? Today that means it's just being evicted from the L3 cache on the i7 processor. Ahh, progress.