Subject: Stack probes in gcc
From: [email-masked] (root)

29 Dec 1996 08:36:48 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Content-Type: text
Original-To: [email-masked]
Content-Length: 868       
Original-Sender: [email-masked]

I would like to know if this program traps with gcc:
main()
{
	int table[15000];
	table[14999] = 67;
}
The reason is that I have discovered the following:
Default stack commit size is only 4K. To avoid traps, MSVC generates code
to call a function that will touch all stack pages needed by the function
in the function's prolog. I THINK that this is done only if the stack
frame is larger than 4K. I would like to know how gcc solves this problem
so that I can do a similar thing.

Of course all this can be avoided if you set the stack-commit size at
link-time with a command-line argument to the linker, but I think my users 
would prefer an automatic solution. What does gcc do?

Thanks in advance and sorry for this kind of trivia...

-- 
Jacob Navia	Logiciels/Informatique
41 rue Maurice Ravel			Tel 01 48.23.51.44
93430 Villetaneuse 			Fax 01 48.23.95.39
France
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".