Re: <INTEGRITY RTOS> Error "ObjectTableIsFull" while CreateProtectedTask()
- From: "Alex Vinokur" <alexvn@xxxxxxxxxxxxxxxxxxxxx>
- Date: 28 Feb 2006 06:29:06 -0800
Alex Vinokur wrote:
[snip]
A program below
* works fine with STACK_SIZE=0x2000
* produces Error-44 (NoPagesOnFreeList)
* produces Error-3 (ObjectTableIsFull)
How should we manage memory resources in order to get programs working
fine?
A stack of size StackSize while CreateProtectedTask() is allocated from
the AddressSpace's default MemoryRegionPool.
// ------ With default MemoryRegionPool ------
------ foo.cc ------
#include <INTEGRITY.h>
#include <stdio.h>
#include <iostream>
#include <vector>
#include <util/error_string.h>
using namespace std;
#define STACK_SIZE 0x2000 // OK// -------------------------------------------
// #define STACK_SIZE 0x5000 // IntegrityError = 44: NoPagesOnFreeList
// #define STACK_SIZE 0x7000 // IntegrityError = 3: ObjectTableIsFull
// ------ MemoryPoolSize = 0x200000 ------
// MemoryPoolSize 0x200000 has been set in Integrate file (foo.int)
#define STACK_SIZE 0x7000 // Works OK
// ---------------------------------------
[snip]
for (size_t i = 0; i < NUMBER_OF_TASKS; i++)
{
CheckError (CreateProtectedTask(1, (Address)task, STACK_SIZE,
taskName[i], &children[i]));
[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
.
- References:
- <INTEGRITY RTOS> Error "ObjectTableIsFull" while CreateProtectedTask()
- From: Alex Vinokur
- Re: <INTEGRITY RTOS> Error "ObjectTableIsFull" while CreateProtectedTask()
- From: Alex Vinokur
- <INTEGRITY RTOS> Error "ObjectTableIsFull" while CreateProtectedTask()
- Prev by Date: Re: @far directive not working as expected
- Next by Date: Re: BT USB HID control. ( packet )
- Previous by thread: Re: <INTEGRITY RTOS> Error "ObjectTableIsFull" while CreateProtectedTask()
- Next by thread: why does the lcd display so lag.
- Index(es):