* Compiler problem, Digital C++ 6.1
@ 2003-06-17 1:45 Grant
2003-06-17 9:14 ` Dr Ivan D. Reid
2003-06-17 23:04 ` Grant
0 siblings, 2 replies; 4+ messages in thread
From: Grant @ 2003-06-17 1:45 UTC (permalink / raw)
Hopefully someone can give me a clue here. Or at least point me to a better
newsgroup. Its really directly related with the Digital Compiler 6.1(others
I am sure too). Just trying to get some support on it(as my company is too
cheap to pay for support)
OS: Compaq's Unix Tru64 4.0f
Compiler: DIGITAL C++ V6.1-029 on DIGITAL UNIX V4.0 (Rev. 1229)
Problem:
We have an application that must be linked with the -taso flag.
Which forces pointers to only use the lower 31 bits of address space. This
is mainly because a product we need that we link it requires it. We can't
fix that.
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.
I'm hoping there is some other flag or somethign can may address this.
Anyone have a clue?
I made a small test app that just mallocs until it fails. It was built
with the following flags. This will fail at around 300 megs.
Compile line: cxx -taso -c -o test3.o test3.cxx
Link line : cxx -taso -o test3 test3.o
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Compiler problem, Digital C++ 6.1
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
2003-06-17 23:04 ` Grant
1 sibling, 1 reply; 4+ messages in thread
From: Dr Ivan D. Reid @ 2003-06-17 9:14 UTC (permalink / raw)
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)?
--
Ivan Reid, Electronic & Computer Engineering, ___ CMS Collaboration,
Brunel University. Ivan.Reid@brunel.ac.uk Room 40-1-B12, CERN
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compiler problem, Digital C++ 6.1
2003-06-17 9:14 ` Dr Ivan D. Reid
@ 2003-06-17 23:02 ` Grant
0 siblings, 0 replies; 4+ messages in thread
From: Grant @ 2003-06-17 23:02 UTC (permalink / raw)
"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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Compiler problem, Digital C++ 6.1
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:04 ` Grant
1 sibling, 0 replies; 4+ messages in thread
From: Grant @ 2003-06-17 23:04 UTC (permalink / raw)
Ah, should check all newsgroups. The person who fixed the issue for me also
post the reply in com.sys.tru64. I was desperate and asked both places(ok a
few others too).
I won't repeat allwhat was posted. But it was a great help.
-grant
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-06-17 23:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2003-06-17 23:04 ` Grant
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox