2001-10-17 22:22:29

by Oleg A. Yurlov

[permalink] [raw]
Subject: "3.5GB user address space" option.


Hi, folks,

How I can use 3.5GB in my apps ? I try malloc() and get error on 2G
bounce... :-(

Hardware - SMP server, 2Gb RAM, 8Gb swap, kernel 2.4.12aa1.

--
Oleg A. Yurlov aka Kris Werewolf, SysAdmin OAY100-RIPN
mailto:[email protected] +7 095 332-03-88


2001-10-17 22:29:30

by Rik van Riel

[permalink] [raw]
Subject: Re: "3.5GB user address space" option.

On Thu, 18 Oct 2001, Oleg A. Yurlov wrote:

> How I can use 3.5GB in my apps ? I try malloc() and get
> error on 2G bounce... :-(

You may want to use the 'hoard' memory allocation library,
it seems a bit smarter than glibc's malloc in getting all
the address space your program wants.

1) install libhoard
2) export LD_PRELOAD=libhoard.so
3) run the program

cheers,

Rik
--
DMCA, SSSCA, W3C? Who cares? http://thefreeworld.net/ (volunteers needed)

http://www.surriel.com/ http://distro.conectiva.com/

2001-10-18 04:38:42

by H. Peter Anvin

[permalink] [raw]
Subject: Re: "3.5GB user address space" option.

Followup to: <[email protected]>
By author: "Oleg A. Yurlov" <[email protected]>
In newsgroup: linux.dev.kernel
>
>
> Hi, folks,
>
> How I can use 3.5GB in my apps ? I try malloc() and get error on 2G
> bounce... :-(
>
> Hardware - SMP server, 2Gb RAM, 8Gb swap, kernel 2.4.12aa1.
>

Get a 64-bit CPU. You're running into a fundamental limit of 32-bit
architectures.

-hpa
--
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <[email protected]>

2001-10-18 09:09:29

by Andrea Arcangeli

[permalink] [raw]
Subject: Re: "3.5GB user address space" option.

On Wed, Oct 17, 2001 at 09:38:35PM -0700, H. Peter Anvin wrote:
> Followup to: <[email protected]>
> By author: "Oleg A. Yurlov" <[email protected]>
> In newsgroup: linux.dev.kernel
> >
> >
> > Hi, folks,
> >
> > How I can use 3.5GB in my apps ? I try malloc() and get error on 2G
> > bounce... :-(
> >
> > Hardware - SMP server, 2Gb RAM, 8Gb swap, kernel 2.4.12aa1.
> >
>
> Get a 64-bit CPU. You're running into a fundamental limit of 32-bit
> architectures.

Actually 3.5G per-process is theoretically possible using a careful
userspace as Rik suggested with -aa after enabling the proper
compile time configuration option. So for apps that needs say 3G
per-process it should work just fine. But of course for anything that
needs more than that 64bit is the right way to go :)

Andrea

2001-10-18 13:51:28

by Oleg A. Yurlov

[permalink] [raw]
Subject: Re[2]: "3.5GB user address space" option.


Hi,

Thursday, October 18, 2001, 1:09:14 PM, you wrote:

AA> On Wed, Oct 17, 2001 at 09:38:35PM -0700, H. Peter Anvin wrote:
>> Followup to: <[email protected]>
>> By author: "Oleg A. Yurlov" <[email protected]>
>> In newsgroup: linux.dev.kernel
>> >
>> >
>> > Hi, folks,
>> >
>> > How I can use 3.5GB in my apps ? I try malloc() and get error on 2G
>> > bounce... :-(
>> >
>> > Hardware - SMP server, 2Gb RAM, 8Gb swap, kernel 2.4.12aa1.
>> >
>>
>> Get a 64-bit CPU. You're running into a fundamental limit of 32-bit
>> architectures.

AA> Actually 3.5G per-process is theoretically possible using a careful
AA> userspace as Rik suggested with -aa after enabling the proper
AA> compile time configuration option. So for apps that needs say 3G
AA> per-process it should work just fine. But of course for anything that
AA> needs more than that 64bit is the right way to go :)

Thanks to all, problem solved :-) Now apps can use about 3.5G.

AA> Andrea
AA> -
AA> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
AA> the body of a message to [email protected]
AA> More majordomo info at http://vger.kernel.org/majordomo-info.html
AA> Please read the FAQ at http://www.tux.org/lkml/

--
Oleg A. Yurlov aka Kris Werewolf, SysAdmin OAY100-RIPN
mailto:[email protected] +7 095 332-03-88