2 ms·
Well, no actually: That still limits you to a gets of BUFSIZ. Just as we often grow the stack with page faults, you could grow the heap with page faults: Moder
by geocar 9y ago
Well, no actually: That still limits you to a gets of BUFSIZ.
Just as we often grow the stack with page faults, you could grow the heap with page faults: Modern UNIX doesn't because this is another one of those "almost certainly a mistake", but:
signal(SIGSEGV, grow);
void grow(int _) { sbrk(PAGESZ); }
should work.