Before using a memory partition, it must be created. This allows µC/OS-III to know something about the memory partition so that it can manage their allocation and deallocation. Once created, a memory partition is as shown in the figure below. Calling OSMemCreate()
creates a memory partition.
The listing below shows how to create a memory partition with µC/OS-III, but this time, using malloc()
to allocate storage. Do not deallocate the memory control block or the storage for the partition.