delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2003/01/31/09:06:53

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Date: Fri, 31 Jan 2003 09:13:23 -0500
From: Jason Tishler <jason AT tishler DOT net>
Subject: shared_info::heap_chunk* questions (and potential patch)
To: Cygwin-Developers <cygwin-developers AT cygwin DOT com>
Mail-followup-to: Cygwin-Developers <cygwin-developers AT cygwin DOT com>
Message-id: <20030131141323.GB736@tishler.net>
MIME-version: 1.0
User-Agent: Mutt/1.4i

--Boundary_(ID_a1wQ86LvX/RMTSmAM5yKjQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline

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.

2. There appears to be a "yank and put" typo when querying the HKLM
value.

See attached for the details.  Am I missing something?

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--Boundary_(ID_a1wQ86LvX/RMTSmAM5yKjQ)
Content-type: text/plain; charset=us-ascii; NAME=shared.cc.diff
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=shared.cc.diff

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
@@ -146,6 +146,8 @@ open_shared (const char *name, int n, HA
 void
 shared_info::initialize ()
 {
+  heap_chunk = 0;
+
   if (version)
     {
       if (version != SHARED_VERSION_MAGIC)
@@ -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)

--Boundary_(ID_a1wQ86LvX/RMTSmAM5yKjQ)--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019