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. |
...
Allocating variables that exceed your program's share of RAM can have unexpected consequences. Very large allocations will fail to link - if your program allocates a 64K array, the program will fail to link. Exceeding the 8K 12K guidelines is trickier - it may work today, but will fail on a later network library revision that uses more memory, or it may work under certain conditions, then fail as the network activity increases. If you do exceed the memory allocated to a task stack you may see faults, or unexpected asserts as memory used by another part of the stack gets overwritten. Memory corruption can be very difficult to debug.
...