Thread win32 ActivePerl fork und Speicher: beendete kindprozesse liegen im speicher (7 answers)
Opened by ash77 at 2006-03-31 12:43

sesth
 2006-03-31 15:16
#64233 #64233
User since
2005-02-01
181 Artikel
BenutzerIn
[default_avatar]
Unter Windows bekommst Du bei fork nur Pseudoprozesse, die in Wahrheit Threads sind:
Quote
The fork() emulation is implemented at the level of the Perl interpreter. What this means in general is that running fork() will actually clone the running interpreter and all its state, and run the cloned interpreter in a separate thread, beginning execution in the new thread just after the point where the fork() was called in the parent. We will refer to the thread that implements this child ``process'' as the pseudo-process.

To the Perl program that called fork(), all this is designed to be transparent. The parent returns from the fork() with a pseudo-process ID that can be subsequently used in any process manipulation functions; the child returns from the fork() with a value of 0 to signify that it is the child pseudo-process.

Da jedesmal der gesamte Interpreter in den neuen Thread geklont wird, ist der Speicher schnell voll. Das Betriebssystem sollte aber den Threadspeicher wieder freigeben, wenn der Thread ordnungsgemäß beendet wurde.
Gruß
Thomas

View full thread win32 ActivePerl fork und Speicher: beendete kindprozesse liegen im speicher