Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Date: Fri, 31 Jan 2003 10:01:31 -0500 From: Christopher Faylor To: cygwin-developers AT cygwin DOT com Subject: Re: shared_info::heap_chunk* questions (and potential patch) Message-ID: <20030131150131.GC28668@redhat.com> Reply-To: cygwin-developers AT cygwin DOT com Mail-Followup-To: cygwin-developers AT cygwin DOT com References: <20030131141323 DOT GB736 AT tishler DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030131141323.GB736@tishler.net> User-Agent: Mutt/1.5.1i On Fri, Jan 31, 2003 at 09:13:23AM -0500, Jason Tishler wrote: >While trying to increase the Cygwin heap size (to see if this would >allow PostgreSQL's PL/Tcl to work properly), I noticed the following: > >1. The shared_info::heap_chunk value seems to be uninitialized so that >shared_info::heap_chunk_size() always returns without examining the >registry for user settings. heap_chunk is only supposed to be read when the shared area is uninitialized. That's why it is in the shared area rather than just a static local variable. So, you have to exit all running cygwin apps before that value takes effect. >2. There appears to be a "yank and put" typo when querying the HKLM >value. Yep, that's a bug. I'll check in that version of your patch. Thanks. cgf >Index: shared.cc >=================================================================== >RCS file: /cvs/src/src/winsup/cygwin/shared.cc,v >retrieving revision 1.64 >diff -u -p -r1.64 shared.cc >--- shared.cc 2 Nov 2002 03:31:15 -0000 1.64 >+++ shared.cc 31 Jan 2003 13:37:00 -0000 >@@ -245,7 +247,7 @@ shared_info::heap_chunk_size () > reg_key r1 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE", > CYGWIN_INFO_CYGNUS_REGISTRY_NAME, > CYGWIN_INFO_CYGWIN_REGISTRY_NAME, NULL); >- heap_chunk = reg.get_int ("heap_chunk_in_mb", 384); >+ heap_chunk = r1.get_int ("heap_chunk_in_mb", 384); > } > > if (heap_chunk < 4)