Insufficient memory for stack/FP context

Chris Welch cwelch at neumes.com
Wed Sep 11 19:19:54 UTC 2002


Yep, I'm out of memory.

The bus error was occuring in the user extention to the fatal_error handler
trying to report that there was insufficient space for heap.

Thanks much for the tips Joel, I'm back on the road again.

Chris

-----Original Message-----
From: Joel Sherrill [mailto:joel.sherrill at OARcorp.com]
Sent: Tuesday, September 10, 2002 5:34 PM
To: cwelch at neumes.com
Cc: RTEMS
Subject: Re: Insufficient memory for stack/FP context




Chris Welch wrote:
>
> I'm hitting a ceiling with the number of tasks I can create.  I start
> getting an RTEMS_UNSATISFIED error (not enough memory for stack/FP
context).
>
> What do I need to change to increase the memory available for the stack/FP
> context?
>
> I've had disasterous results so far increasing the heap size and/or
> increasing the task space using CONFIGURE_EXTRA_TASK_STACKS (processor bus
> errors).  I expect I've got to fix up this problem, however, in the mean
> time I'd like to know if I'm headed in the right direction.

If that's the error and not RTEMS_TOO_MANY, then it is a memory problem.
If incrasing CONFIGURE_EXTRA_TASK_STACKS causes a bus error, then I
suspect
that the code that is calculating the heap/workspace in combination with
the linkcmds is broken for your board.  See what is passed to
bsp_libc_init
and what the values for work_space_address and work_space_size are in
Configuration.

Look at the code in c/src/lib/libbsp/m68k/m68kpretaskinghook.c and
see if the math really works on your board.  All it takes is one
memory related constant wrong and BOOM!

> Thanks much!
> ----
> Chris Welch, Neumes Consulting, PC and UNIX Solutions
> mailto:cwelch at neumes.com
> 613)797-7831 FAX:(613)838-5602
> http://www.neumes.com

--
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the users mailing list