News for hackers. Stuff that matters.
Re:Taking PHP Seriously by nostrademons on Thursday October 13, 2016 @06:18PM (#12704570)
The idea here is that the webserver forks & execs a new process for every request, allocates a bunch of pages, and then runs to completion, at which point the process finishes and the memory is returned to the OS. It's essentially using the OS as an arena, where you can allocate memory at will just by bumping a pointer and then the whole thing is freed at once at the end of the request.

It's not an insane idea - CGI worked exactly like this, as do most command-line shells. And the overhead is often less than most people expect, since most pages are COWed on fork() and the files it touches will likely be in the filesystem cache. Still, I think people found that the overhead from process creation (and in particular, keeping all those processes around & task-switching them while they make DB/network/filesystem calls) was greater than that from GC, and so most frameworks - PHP included, these days! - use a more lightweight mechanism.

Re:Taking PHP Seriously by pcwalton on Thursday October 13, 2016 @06:24PM (#12704620)
Yes, I know what the idea is. I highly suspect it won't be practical due to the reasons given in my other reply. We tried this with JavaScript in a very similar domain and the memory usage was unacceptable.