Discussion:
Function of Alloc_Probe
(too old to reply)
Jacky Luk
2004-04-14 05:13:03 UTC
Permalink
What does the following undocumented function do?
__Alloca_Probe
I have more later. Or could someone recommend a thorough text for
undocumented NT/2000/XP functions?
Thanks
Jack
Ivan Brugiolo [MSFT]
2004-04-14 05:35:36 UTC
Permalink
the documented _alloca() function uses as a support routine alloca_probe.
When the compiler is allocating local data that can cross a page boundary
(oversimplified version of the story),
it uses some intrisics that will cause alloca_probe to be written to the
generated code.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Post by Jacky Luk
What does the following undocumented function do?
__Alloca_Probe
I have more later. Or could someone recommend a thorough text for
undocumented NT/2000/XP functions?
Thanks
Jack
Jacky Luk
2004-04-14 07:42:28 UTC
Permalink
Thanks you very much :)
Post by Ivan Brugiolo [MSFT]
the documented _alloca() function uses as a support routine alloca_probe.
When the compiler is allocating local data that can cross a page boundary
(oversimplified version of the story),
it uses some intrisics that will cause alloca_probe to be written to the
generated code.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Post by Jacky Luk
What does the following undocumented function do?
__Alloca_Probe
I have more later. Or could someone recommend a thorough text for
undocumented NT/2000/XP functions?
Thanks
Jack
Alexander Grigoriev
2004-04-14 14:52:22 UTC
Permalink
The full story is that only one page of stack can be committed at once.
Accessing beyound that is considered an access violation. If the local
variables are more than one page, the prologue code needs to touch all pages
(which is what Alloca_Probe does), to make sure they are committed.
Post by Ivan Brugiolo [MSFT]
the documented _alloca() function uses as a support routine alloca_probe.
When the compiler is allocating local data that can cross a page boundary
(oversimplified version of the story),
it uses some intrisics that will cause alloca_probe to be written to the
generated code.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Post by Jacky Luk
What does the following undocumented function do?
__Alloca_Probe
I have more later. Or could someone recommend a thorough text for
undocumented NT/2000/XP functions?
Thanks
Jack
Loading...