FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 06-27-2011, 05:43 PM
Peter Teuben
 
Default ld a memory hog on Ubuntu 10/11?

On 06/27/2011 12:58 PM, Peter Teuben wrote:
Recently I noted that the loaded (ld) allocates memory that I've
declared in large static arrays in fortran programs.
I wrote a simple short C program that exhibits the same problem (or
perhaps it's a new feature):


gcc -o ldhog ldhog.c

will (depending how much memory you have, and how big N is) sit there
for quite some time.This version uses a little over 500MB.
In previous versions of ld, this was not a problem, but somehow now it
is. Perhaps this is a bug fixed in Ubuntu 11 ?

I am running this on 10.10.
AFAIK, the array is uninitilized data, and indeed, the size command
shows up with 500+ MB in the .bss section of the executable.
So it's beyond me why ld should allocate that space and do something
with it.


Anybody have an idea what's going on here?




one reply to my post. The compile (link) option

-fuse=gold

appears to be doing the job. I also confirmed that Ubuntu 11.04 still
has the same "issue", thogh a newer version

of binutils.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-27-2011, 05:59 PM
Peter Teuben
 
Default ld a memory hog on Ubuntu 10/11?

On 06/27/2011 01:43 PM, Peter Teuben wrote:


On 06/27/2011 12:58 PM, Peter Teuben wrote:
Recently I noted that the loaded (ld) allocates memory that I've
declared in large static arrays in fortran programs.
I wrote a simple short C program that exhibits the same problem (or
perhaps it's a new feature):


gcc -o ldhog ldhog.c

will (depending how much memory you have, and how big N is) sit there
for quite some time.This version uses a little over 500MB.
In previous versions of ld, this was not a problem, but somehow now
it is. Perhaps this is a bug fixed in Ubuntu 11 ?

I am running this on 10.10.
AFAIK, the array is uninitilized data, and indeed, the size command
shows up with 500+ MB in the .bss section of the executable.
So it's beyond me why ld should allocate that space and do something
with it.


Anybody have an idea what's going on here?




one reply to my post. The compile (link) option

-fuse=gold

appears to be doing the job. I also confirmed that Ubuntu 11.04
still has the same "issue", thogh a newer version

of binutils.





sorry, typo

-fuse-ld=gold





--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 09:48 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org