Question about task stack allocation
Scott J
scott.j at myrealbox.com
Thu Dec 18 02:24:18 UTC 2003
------ 'Joel Sherrill' said the following on 2003-12-18 1:24 ------:
> mikeci at acm.org wrote:
>
>>> Just read _Thread_Stack_Allocate(), I think maybe 'stack_allocate_hook'
>>> in 'CPU Table' could help. For example you can configure
>>> 'stack_allocate_hook' as 'malloc' so task stacks always allocated in
>>> CRTL.
>
>
> In theory, but I think that the stack_allocate_hook is called from
> a critical seciton which does not allow malloc() to be called. The
Ahhh..yes I forgot that. So what about rtems partition? Is it safe to be
called in critical section?
> general idea was to have a pre-allocated pool of task stacks and
> you manage them in a more simple fashion. The original application
> that used this ended up using an MMU and page management so tasks
> that over or under ran their stack would get a fault.
>
>> Hi!
>>
>> I would like to allocate task stack for one task only. If I use
>> stack_allocate_hook, this hook is for all tasks, right?
>
>
> Yes.
>
>> Regards
>>
>> Ivica
>>
>>
>
>
>
>
More information about the users
mailing list