Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Memory Allocation entering Function
@ 1997-12-31  5:00 WL/DOISA
  1998-01-05  5:00 ` Jeff Sullivan
  0 siblings, 1 reply; 3+ messages in thread
From: WL/DOISA @ 1997-12-31  5:00 UTC (permalink / raw)



I am using the Digital C compiler on an Alpha running OSF1 Alpha V 4.0.  The
compiled C code dumps a core any time a function is entered which contains
static allocation of large local arrays.  I have modified some of the code
to utilize dynamic allocation, and this works, but this is a large code that
was written by others and I do not want to make major changes to the code.
It runs perfectly on a SGI system.  Is there a compiler switch or something
to increase the stack size to functions?  I have encountered this problem on
PCs under DOS, but not on a Unix workstation??





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Memory Allocation entering Function
  1997-12-31  5:00 Memory Allocation entering Function WL/DOISA
@ 1998-01-05  5:00 ` Jeff Sullivan
  1998-01-06  5:00   ` Jeff Sullivan
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Sullivan @ 1998-01-05  5:00 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 221 bytes --]

Could we get a reproducer for this case?

We would be interested in helping to resolve this.
However, it would be difficult to diagnose without
looking at the source code.

Feel free to contact me directly.

Thanks,
-Jeff

[-- Attachment #2: Card for Jeff Sullivan --]
[-- Type: text/x-vcard, Size: 343 bytes --]

begin:          vcard
fn:             Jeff Sullivan
n:              Sullivan;Jeff
org:            Digital Equipment Corporation
email;internet: jps@zk3.dec.com
title:          Principal Software Engineer
note;quoted-printable:http://www.digital.com/=0D=0A=
	
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Memory Allocation entering Function
  1998-01-05  5:00 ` Jeff Sullivan
@ 1998-01-06  5:00   ` Jeff Sullivan
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Sullivan @ 1998-01-06  5:00 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1308 bytes --]

I received the following from a colleague when asked about
this problem:

> This is very likely a problem with their process limits.
> They need to first bump their stack limits for the process and
> if that's not enough, bump the system limits in /etc/sysconfigtab.

You should be able to check this using the "limit" command in
the C-shell. The default stacksize may be around 2048 kbytes.

Try to do a "limit stacksize unlimited" in your shell and then
re-run the (crashing) application. You could then experiment with
different values. See man csh(1) and search for "limit" or
man ulimit(1) for more information.

If this works, then the quickest fix might be to write a shell
"wrapper" that bumps up the stacksize and then invokes the program.
The change should affect only that shell. For example:

% ulimit -s
2048

% cat t.csh
#! /bin/csh
ulimit -s
limit stacksize unlimited
ulimit -s

% t.csh
2048
32768
%  ulimit -s
2048

> They will also need to link with raised -T and -D limits to relocate
> the program  in an address space that can accomodate the larger stack.
> The default limits are -T 120000000 and -D 140000000.  They can
> be bumped to -T 200000000 and -D 220000000.

> Anyone using large stacks has to address raising all these limits.


Let us know if any of this helps.

Thanks,
-Jeff

[-- Attachment #2: Card for Jeff Sullivan --]
[-- Type: text/x-vcard, Size: 343 bytes --]

begin:          vcard
fn:             Jeff Sullivan
n:              Sullivan;Jeff
org:            Digital Equipment Corporation
email;internet: jps@zk3.dec.com
title:          Principal Software Engineer
note;quoted-printable:http://www.digital.com/=0D=0A=
	
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-01-06  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-12-31  5:00 Memory Allocation entering Function WL/DOISA
1998-01-05  5:00 ` Jeff Sullivan
1998-01-06  5:00   ` Jeff Sullivan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox