A stack of size StackSize while CreateProtectedTask() is allocated from the AddressSpace's default MemoryRegionPool.
// ------ With default MemoryRegionPool ------
// -------------------------------------------
// ------ MemoryPoolSize = 0x200000 ------ // MemoryPoolSize 0x200000 has been set in Integrate file (foo.int) #define STACK_SIZE 0x7000 // Works OK // ---------------------------------------
[snip]
[snip
[snip]
Nevertheless, there is some question. CreateProtectedTask() returns Success or ErrorCode. Two of ErrorCode's are as follows:
1) ResourceNotAvailable: There is not a region of the desired size in the MemoryRegionPool.
2) MemoryPoolExhausted: There is not sufficient AddressSpace heap memory available for temporary storage and MemoryRegionPool accounting data.
It seems that CreateProtectedTask() should return one of those ErrorCode's in case if StackSize passed to CreateProtectedTask() and MemoryPoolSize are inconsistent.(?)
--
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.