Real-Time Workshop User's Guide | ![]() ![]() |
The real-time malloc
code format (corresponding to the generic real-time malloc
target) is very similar to the real-time code format. The differences are:
malloc
declares memory dynamically.malloc
allows you to multiply instance the same model with each instance maintaining its own unique data. malloc
allows you to combine multiple models together in one executable. For example, to integrate two models into one larger executable, real-time malloc
maintains a unique instance of each of the two models. If you do not use the real-time malloc
format, the Real-Time Workshop will not necessarily create uniquely named data structures for each model, potentially resulting in name clashes.grt_malloc_main.c
, the main routine for the generic real-time malloc
(grt_malloc
) target, supports one model by default.
SeeCombining Multiple Models for information on modifying grt_malloc_main
to support multiple models. grt_malloc_main.c
is located in the directory matlabroot/rtw/c/grt_malloc
.
![]() | Template Makefiles | Unsupported Blocks | ![]() |