Folks,

I am not certain if this has anything to do with Gentoo or not.  I am
programming something in C, and I need to address as much memory as
possible for the arrays that need to be specified as global variables.
 I have 2 GB memory on this machine, and I'd like to use as much of it
as possible, but my code segfaults if I try to allocate more than
around 1 GB of RAM to my running code like that.  I heard that this is
due to the dynamic libraries.  If I compile with gcc and use the
"static" flag, I can allocate close to the physical limit (maybe 1.7
or 1.8 GB) and also if I allocate my variables dynamically, I can do
the same thing.  But the problem is, I cannot compile statically since
I need the math libraries.  I could go the route of dynamic
allocation, but I need to invest significant efforts to restructure my
code.  I saw a thread on something similar to this on Beowulf, where
they suggested moving the dynamic libraries somehow :

 "changing
the location of the shared libraries in memory by changing the
variable __PAGE_OFFSET in kernel header files"... 

How do I do that and do i need to recompile the kernel after
attempting something like this?

Thanks!
Denis
--
gentoo-user@gentoo.org mailing list

Reply via email to