From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,8e9f0858a233d39b X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2003-06-17 16:02:35 PST Newsgroups: comp.sys.dec Subject: Re: Compiler problem, Digital C++ 6.1 From: Grant References: Organization: Nonte Message-ID: User-Agent: Xnews/5.04.25 NNTP-Posting-Host: 216.98.194.80 X-Original-NNTP-Posting-Host: 216.98.194.80 Date: 17 Jun 2003 23:02:34 GMT X-Trace: 17 Jun 2003 23:02:34 GMT, 216.98.194.80 Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.he.net!dimensional.com!pulsar.dimensional.com!207.40.197.76.MISMATCH!mindmeld.idcomm.com Xref: archiver1.google.com comp.sys.dec:16206 "Dr Ivan D. Reid" wrote in news:slrnbetn0j.3p8.Ivan.Reid@loki.brunel.ac.uk: > On 17 Jun 2003 01:45:06 GMT, Grant > wrote in : > >> But, when I build anything and link it with the -taso option. malloc >> fails once I have allocated about 300 megs of RAM(malloc returns 0) > >> We really need this app to be able to get upwards of 300 megs. I just >> don't understand why forcing the 31 bit address space would limit us >> to only 300 megs. > > Are you sure it's not -taso turning on some other limit? Have > you > played with ulimit (IIR UNIX C)? > Yeah. I just got an answer today...-taso by default will limit a process to ~255 megs. Reading in the malloc man page, it talks about how to override this. I don't have the notes here on hand but there was two ways around this. (note the flag may be a little off as I am doing this from memory, I'll post a clear follow up tomorrow when I get back to the culprit computers) At link time, if I linked with just -taso, I get the 255 meg limitation. However if I link with -taso -non_share. The program then works like a charm above the 255 meg limitation. I couldn't use the linker -non_share as it had issues with the way we link our apps. However, there is another way around this(all sorts of good info on this in the malloc man page). There is a global var in malloc that is __sbrk_override. By default if set to 0, you get the limitation. If you set it to 1 in your program, once malloc fails at the 255 limit, it begins to allocation "past the shared libraries" It works for me. The man page describes what it does better than I can. -grant