X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: [FAQ alert] RE: segfault on memory intensive programs Date: Thu, 30 Mar 2006 15:07:19 +0100 Message-ID: <065d01c65403$4232d320$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <20060330135049.70352.qmail@web34801.mail.mud.yahoo.com> 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 30 March 2006 14:51, Pete wrote: > It reports back 1536 MB. Very strange! The registry > setting appears to not be having an effect. 1.5 Gig is about the most it's possible to get under 'doze. The address space of the processor is 4gig, the upper 2 gig (addr >= 0x80000000) belong to the kernel, the lower 2 gig belong to user-land. Take away 512k at the top of that for the space where the dll's load (0x600000000 - 0x7fffffff), and what you're left with is what you get. As to the FAQ entry, it really needs a little alteration. Ping JDF! It should make clear that those parameters are in bytes. The example of a 4k stack and 1k heap is a bit unrealistic and it might be more productive to show people how to make exes with /big/ stacks, since that's the problem people usually run into. How about something a bit more like ------------------------------------------------------------- 21. How can I adjust the heap/stack size of an application? If you need to change the maximum amount of memory available to Cygwin, see http://cygwin.com/cygwin-ug-net/setup-maxmem.html. Otherwise, just pass the desired heap/stack size in bytes as linker arguments to gcc. To create foo.exe with a heap size of 200MB and a stack size of 8MB, you would invoke gcc as: gcc -Wl,--heap,200000000,--stack,8000000 -o foo foo.c ------------------------------------------------------------- cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/