X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com Subject: Re: Excessive thrashing when popen()ing after a large malloc() In-Reply-To: <4559D376.9030707@byu.net> Message-Id: <20061114154207.3B49E148F021@u53026a.matapp.unimib.it> Date: Tue, 14 Nov 2006 16:42:07 +0100 (CET) From: grenie AT matapp DOT unimib DOT it (Loic Grenie) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Tue Nov 14 15:53:36 2006, Eric Blake (ebb9 AT byu DOT net ) wrote: > According to Loic Grenie on 11/14/2006 4:12 AM: >> The subjects says it all: when a process has a large memory space, >> a popen() triggers a long disk thrashing. The result can clearly be >> seen iwth the allegated cygtharsh program (running with 1GB of memory, >> change the size of the malloc to roughly half your memory size): > Indeed - the fork/exec model of the current popen implementation is harsh > on large memory spaces, compared to your proposed spawn model. While the > idea may have merit, you have some work to do before a patch can be accepted. I did actually not submit a patch, I suggested a modification with some basic, untested, lines of code as a start. >> to something similar to (warning: untested, needs a char *cmd; at the >> beggining): > Hint - popen is implemented in newlib, not cygwin, so you are posting to > the wrong list. Unless you provide a 'diff -u' patch, it is very > difficult to see your changes in context. Sorry, I'll try to write there, with an additional diff -u. > And admitting that your changes are untested is not a good sign for > getting it approved. I'm not really "admitting", I am just expliciting that the patch is untested. I do not have the resources to build the thing. Sorry to have disturbed, happy cygwining, Loïc -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/