From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: "resource temporarily unavailable" errors on windows 7 Date: Wed, 14 Mar 2012 19:49:07 +0200 Message-ID: <83d38fvzsc.fsf@gnu.org> References: <83aa3lybos.fsf@gnu.org> <83vcm9w3th.fsf@gnu.org> <83obs0wb0p.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1331747370 13705 80.91.229.3 (14 Mar 2012 17:49:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 14 Mar 2012 17:49:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alex Harsanyi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 14 18:49:28 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S7sK9-0008Sl-IK for ged-emacs-devel@m.gmane.org; Wed, 14 Mar 2012 18:49:21 +0100 Original-Received: from localhost ([::1]:37933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7sK9-0002rd-0u for ged-emacs-devel@m.gmane.org; Wed, 14 Mar 2012 13:49:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7sK6-0002qg-AS for emacs-devel@gnu.org; Wed, 14 Mar 2012 13:49:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7sK1-0001xN-Jf for emacs-devel@gnu.org; Wed, 14 Mar 2012 13:49:17 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:60782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7sK1-0001xC-BG for emacs-devel@gnu.org; Wed, 14 Mar 2012 13:49:13 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M0V00400YTMSC00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Wed, 14 Mar 2012 19:49:10 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.179.236]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M0V0045ZYTVGN80@a-mtaout22.012.net.il>; Wed, 14 Mar 2012 19:49:08 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:149057 Archived-At: > Date: Wed, 14 Mar 2012 13:34:42 +0800 > From: Alex Harsanyi > Cc: emacs-devel@gnu.org > > I also read the MSDN documentation for CreateThread and it looks like > the dwStackSize parameter represents the commit size unless the > STACK_SIZE_PARAM_IS_A_RESERVATION flag is passed to CreateThread. I > tried adding this flag, but it was not recognized by mingw so I > replaced it with the value (0x00010000). > > When I recompiled, the resulting emacs would reserve 1Mb of stack for > each new thread. I than tried a few values for the dwStackSize > parameter and the smallest stack reservation I could obtain was 64K, > Here is the call: > > cp->thrd = CreateThread (NULL, 64 * 1024, reader_thread, cp, > 0x00010000, &id); And does this smaller stack reservation improve the situation, if you return the initial memory request in allocate_heap to its original value.