On Jun 25, 2014, at 8:23 PM, Thomas Rognon <tcrog...@gmail.com> wrote:
> I got "unresolved external symbol __chkstk"
>
> From http://support.microsoft.com/kb/100775
> "To prevent the fault, the compiler calls the __chkstk() function each time
> the local allocation exceeds 4K."
>
> VOID Foo ()
> {
> UINT8 Buffer[SOME_NUMBER_BIGGER_THAN_4K];
> ...
> }
> won't compile.
>
> Any ideas on a generic solution for this problem? Or am I missing something?
>
Thomas,
What toolchain are you using? It looks like most of the VC++ versions set
/Gs32768
(https://svn.code.sf.net/p/edk2/code/trunk/edk2/BaseTools/Conf/tools_def.template),
which should make the size 32K. So the limit should be 32K, not 4K?
The stack is only 128K in EFI, so I would not recommend making big allocations
on the stack.
If you make your local a static variable it will get allocated from BSS (like a
global) and you will not use the stack space.
Thanks,
Andrew Fish
> Thanks,
> Thomas Rognon
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel