comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Optimising A = B+C?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Optimising A = B+C? [message #6338 is a reply to message #6257] Tue, 04 June 1996 00:00 Go to previous messageGo to previous message
davis is currently offline  davis
Messages: 15
Registered: March 1995
Junior Member
On 3 Jun 1996 22:05:03 GMT, John E. Davis <davis@space.mit.edu>
wrote:
: Here is the file t.c:
[...]
: int main (int argc, char **argv)
: {
: unsigned int dim = MAX_SIZE * MAX_SIZE;
: unsigned int i;
: float a[MAX_SIZE+EXTRA][MAX_SIZE+EXTRA], b[MAX_SIZE+EXTRA][MAX_SIZE+EXTRA];

On some systems it is necessary to make `a' and `b' global variables because
as declared, they use up about 2*4*1024*1024 = 8 Mbytes of stack space.
This will cause the program to core dump if not enough stack space is
available. The change will look like:

float a[MAX_SIZE+EXTRA][MAX_SIZE+EXTRA], b[MAX_SIZE+EXTRA][MAX_SIZE+EXTRA];
int main (int argc, char **argv)
{
unsigned int dim = MAX_SIZE * MAX_SIZE;
unsigned int i;

--
John E. Davis Center for Space Research/AXAF Science Center
617-258-8119 MIT 37-662c, Cambridge, MA 02139
http://space.mit.edu/~davis
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: WE NEED YOUR INPUT
Next Topic: another composite image question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 22:48:18 PDT 2025

Total time taken to generate the page: 1.27899 seconds