1 \documentclass[tikz
]{standalone
}
5 % basicstyle=\tt\scriptsize,
6 % breakatwhitespace=false,
11 % escapeinside={[+}{+]}, % chktex 9
16 % showstringspaces=false,
23 \usetikzlibrary{arrows.meta,shapes.symbols,matrix,positioning
}
28 every node/.append style=
{
29 font=
\footnotesize\tt, outer xsep=
.4ex,
31 column
2/.append style=
{
32 every node/.append style=
40 descr/.style=
{draw=none,fill=none
},
41 break above/.style=
{shape=tape, tape bend top=in and out, tape bend bottom=none
},
42 break below/.style=
{shape=tape, tape bend top=none, tape bend bottom=in and out
},
43 !!/.style=
{fill=green!
20},
% chktex 26
44 pointer/.style =
{font=
\tt, anchor=base, inner sep=
2pt
},
46 \matrix (main)
[memory
] {
47 & |
[descr
]|
{\rm high addresses
} \\
55 & |
[descr
]|
{\rm low addresses
}\\
57 \matrix (heap)
[right=of main,memory,yshift=
2em
] {
58 & || tree
\textsubscript{0}\\
59 & || tree
\textsubscript{1}\\
60 & || tree
\textsubscript{\ldots}\\
61 & || tree
\textsubscript{n
}\\
63 \matrix (global)
[left=of main,memory,yshift=
2em
] {
64 & || task
\textsubscript{n
}\\
65 & || task
\textsubscript{\ldots}\\
66 & || task
\textsubscript{1}\\
67 & || task
\textsubscript{0}\\
69 \draw[dashed
] (main-
2-
2.north east) -- (heap-
1-
2.north west);
70 \draw[dashed
] (main-
3-
2.south east) -- (heap-
4-
2.south west);
72 \draw[dashed
] (main-
7-
2.north west) -- (global-
1-
2.north east);
73 \draw[dashed
] (main-
8-
2.south west) -- (global-
4-
2.south east);
75 % \node (tree) [right=of heap] {
78 % enum BCTaskType_c task_type;
80 % uint16_t refresh_min;
81 % uint16_t refresh_max;
82 % struct TaskTree *parent;
88 % struct TaskTree *lhs;
89 % struct TaskTree *rhs;
92 % } data;\end{lstlisting}
95 % \draw[dashed] (tree.north west) -- (heap-1-2.north east);
96 % \draw[dashed] (tree.south west) -- (heap-1-2.south east);