delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/04/08/13:53:34

From: rdparker AT butlermfg DOT org (Parker, Ron)
Subject: RE: Question about Sergey's heap change
8 Apr 1998 13:53:34 -0700 :
Message-ID: <c=US%a=_%p=Butler_Manufactu%l=BUILDINGS/BLDGSHUB/000937E0.cygnus.cygwin32.developers@nttwr2.tower.bldgs.butlermfg.org>
Mime-Version: 1.0
To: "'noer AT cygnus DOT com'" <noer AT cygnus DOT com>, Ian Lance Taylor
<ian AT cygnus DOT com>
Cc: "'cygwin32-developers'" <cygwin32-developers AT cygnus DOT com>

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------ =_NextPart_000_01BD62FE.7497C2C0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

As long as the heap space is only being reserved and not committed, no 
swap space is used for it.

If you look at heap_init() in heap.c you will see that the heap is 
being allocated in virtual memory by VirtualAlloc.  When a process is 
not the result of a fork, this is being allocated with MEM_RESERVE, so 
no swap space is used, only page table entries are set up for it.  In 
commit_and_inc() the swap space is being committed.

-----Original Message-----
From: Ian Lance Taylor [mailto:ian AT cygnus DOT com]
Sent: Tuesday, April 07, 1998 10:54 PM
To: noer AT cygnus DOT com
Cc: cygwin32-developers AT cygnus DOT com; noer AT cygnus DOT com
Subject: Re: Question about Sergey's heap change


   From: Geoffrey Noer <noer AT cygnus DOT com>
   Date: Tue, 7 Apr 1998 18:41:15 -0700 (PDT)

   Sergey Okhapkin wrote:
   >
   > Now I know why _every_ cygwin process have a splitted heap if it 
allocates
   > more than heap_chunk_size bytes of memory (but I will not tell 
you why this
   > happens - think yourself!-) Here is the temporary fix - reserve a 
large
   > amount of memory for heap to avoid fork problem. The fix doesn't 
affect
   > performance.
   >
   > H:\usr\src\cygnus\cdk\winsup>diff -u shared.cc.orig shared.cc
   > --- shared.cc.orig      Wed Feb 11 06:15:08 1998
   > +++ shared.cc   Tue Mar 24 10:44:55 1998
   > @@ -96,7 +96,7 @@
   >
   >    reg_session reg;
   >
   > -  heap_chunk_in_mb = reg.get_key ().get_int ("heap_chunk_in_mb", 
8);
   > +  heap_chunk_in_mb = reg.get_key ().get_int ("heap_chunk_in_mb", 
128);
   >    if (heap_chunk_in_mb < 4)
   >      {
   >        heap_chunk_in_mb = 4;

   Are there reasons why I shouldn't make this change?

On a traditional Unix system, making this change would mean that 
every
process would require 128 MB in the swap file, and your system would
rapidly run out of swap space.  I don't know how the Windows
equivalent of a swap file works, so I don't know whether there would
be any equivalent problem.

Ian


------ =_NextPart_000_01BD62FE.7497C2C0
Content-Type: application/ms-tnef
Content-Transfer-Encoding: base64

eJ8+IgYTAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy
b3NvZnQgTWFpbC5Ob3RlADEIAQmAAQAhAAAARkM4RkYwRDMyOUNFRDExMThBQUEwMDYwMDhDNzcx
MjkANAcBIIADAA4AAADOBwQACAAOADgAAQADACsBAQWAAwAOAAAAzgcEAAgACgAWACoAAwAuAQEN
gAQAAgAAAAIAAgABBIABACgAAABSRTogUXVlc3Rpb24gYWJvdXQgU2VyZ2V5J3MgaGVhcCBjaGFu
Z2UA8Q0BA5AGAHAKAAArAAAACwACAAEAAAALACsAAAAAAAMALgAAAAAAQAA5AGAbnSwCY70BHgBw
AAEAAAAkAAAAUXVlc3Rpb24gYWJvdXQgU2VyZ2V5J3MgaGVhcCBjaGFuZ2UAAgFxAAEAAAAbAAAA
Ab1io6xm8jUKoM1cEdGALggACeAbgQAVTu8gAAMABhBo8RcCAwAHEJ0FAAAeAAgQAQAAAGUAAABB
U0xPTkdBU1RIRUhFQVBTUEFDRUlTT05MWUJFSU5HUkVTRVJWRURBTkROT1RDT01NSVRURUQsTk9T
V0FQU1BBQ0VJU1VTRURGT1JJVElGWU9VTE9PS0FUSEVBUElOSVQoKUlOAAAAAAMAEBAAAAAAAwAR
EAAAAAACAQkQAQAAAKcFAACjBQAAigkAAExaRnU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Euw

------ =_NextPart_000_01BD62FE.7497C2C0--

- Raw text -


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