Perl fails with out of memory

S

sunil

Hi,
I run nm command in perl on some 15000 files to collect symbol
information as:
@$oplines = qx "nm -A @$ipfiles";
This works fine on SUNs but on IBMs fails with:
Out of memory!
nm: rmcuall.o: 0654-207 The sort process was stopped prematurely."
This is not nm error since when I do nm on object files at shell
prompt, it is ok. Problem seems to be assigning o/p from nm to array
in perl. But I don't understand why it says nm stopped prematurely.
Ideas?
Thanks,
Sunil.
 
K

Kevin Collins

Hi,
I run nm command in perl on some 15000 files to collect symbol
information as:
@$oplines = qx "nm -A @$ipfiles";
This works fine on SUNs but on IBMs fails with:
Out of memory!
nm: rmcuall.o: 0654-207 The sort process was stopped prematurely."
This is not nm error since when I do nm on object files at shell
prompt, it is ok. Problem seems to be assigning o/p from nm to array
in perl. But I don't understand why it says nm stopped prematurely.
Ideas?
Thanks,
Sunil.

This is not a Perl problem - this is a shell/system problem. Either the user or
system memory limit is being hit. See the man page for whatever shell you run
under and search for ulimit. Also, check the output of 'ulimit' on both systems
and see what the differences are.

Kevin
 
C

ctcgag

Hi,
I run nm command in perl on some 15000 files to collect symbol
information as:
@$oplines = qx "nm -A @$ipfiles";
This works fine on SUNs but on IBMs fails with:
Out of memory!
nm: rmcuall.o: 0654-207 The sort process was stopped prematurely."
This is not nm error

I bet it is an nm or shell error. I base this on the fact that the error
starts with "nm:".
since when I do nm on object files at shell
prompt, it is ok.

On the exact same list of files as you do it on in perl?
Problem seems to be assigning o/p from nm to array
in perl. But I don't understand why it says nm stopped prematurely.
Ideas?

Fix the nm problem, or do:
push @$oplines, qx"nm -A $_" foreach @$ipfiles;

Xho
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,416
Latest member
LionelQ387

Latest Threads

Top