struct Data { char* m_pValue; int m_iValue; Data(char * i_pValue = 0, int i_iValue = 0) : m_pValue (i_pValue), m_iValue (i_iValue) {} };
void CheckError(Error i_Error) { if (i_Error == Success) return;
cerr
A
Alex Vinokur
[snip]
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
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.