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

Re: 2.1.90 dies with many procs procs, partial fix



On Sun, 22 Mar 1998, Finn Arne Gangstad wrote:

> int main() {
> 	int procs = 0;
> 	while (1) {
> 		int err = fork();
> 		if (err == -1) {
> 			perror("fork failed. eek.");
> 			exit(EXIT_FAILURE);
> 		} else if (err == 0) {
> 			setsid();
> 			pause();
> 			_exit(EXIT_SUCCESS);
> 		}
> 		++procs;
> 		printf("%d children forked off\n", procs);
> 		usleep(30000);
> 	}
> 	exit(EXIT_SUCCESS);
> }

Hmm, this is evidence that I was right when I said
that the free_memory_available() system combined
with our current allocation scheme gives trouble.
Linus, what fix do you propose?
(I don't really feel like coding a fix that will
be rejected :-)

Rik.
+-------------------------------------------+--------------------------+
| Linux: - LinuxHQ MM-patches page          | Scouting       webmaster |
|        - kswapd ask-him & complain-to guy | Vries    cubscout leader |
|     http://www.fys.ruu.nl/~riel/          | <H.H.vanRiel@fys.ruu.nl> |
+-------------------------------------------+--------------------------+