Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In an OCSDK application, memory is allocated in two different places:

...

Info

The "app vars" are global in the scope of the user (p2) process - all tasks/functions in your OCSDK program can access them.  They are referred to as "variables local to this application" in the comments since their scope is limited to the user process, so they don't share a name space with the stack.  

...

Allocating variables that exceed your program's share of RAM can have unexpected consequences.   Absurdly large allocations will fail to link - a 64K array will never be allowed.  Exceeding the 8K guidelines is trickier - it may work today, but fail on a later network library revision that uses more memory, or may work under certain conditions, then fail as the network activity becomes increases.  If you do exceed the memory allocated to a task stack you may see faults, or unexpected asserts as memory get overwritten.  This can be very difficult to debug. 

...