5.1 System Memory Management Functions
System memory management functions manage all the memory allocated dynamically by T-Kernel (system memory). This includes memory used internally by T-Kernel as well as task stacks, message buffers, and memory pools.
System memory is managed in memory block units. The block size is normally the page size defined for the MMU. A system that does not use an MMU can set any desired block size, but a size in the range of around 1 KB to 4 KB is recommended. Block size can be learned by calling tk_ref_smb.
System memory is allocated in the system space. T-Kernel does not manage task space memory.
System memory management functions are called as extended SVC. They are for use not only in T-Kernel but also in applications, subsystems and device drivers. In the case of T-Kernel internal use, the calling of these functions without going through extended SVC calls is an implementation-dependent option.

Comments