Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: Grant <matobinder@idcomm.com>
Subject: Re: Compiler problem, Digital C++ 6.1
Date: 17 Jun 2003 23:02:34 GMT	[thread overview]
Message-ID: <Xns939DAD5ED4563Schoeo@216.98.192.68> (raw)
In-Reply-To: slrnbetn0j.3p8.Ivan.Reid@loki.brunel.ac.uk

"Dr Ivan D. Reid" <Ivan.Reid@brunel.ac.uk> wrote in
news:slrnbetn0j.3p8.Ivan.Reid@loki.brunel.ac.uk: 

> On 17 Jun 2003 01:45:06 GMT, Grant <matobinder@idcomm.com>
>  wrote in <Xns939CC8ED7ABD7Schoeo@216.98.192.68>:
> 
>> 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


  reply	other threads:[~2003-06-17 23:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-17  1:45 Compiler problem, Digital C++ 6.1 Grant
2003-06-17  9:14 ` Dr Ivan D. Reid
2003-06-17 23:02   ` Grant [this message]
2003-06-17 23:04 ` Grant
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox