process the rest of Pieter's comments
[phd-thesis.git] / top / memorylayout.tex
index eb24dfd..3a044e8 100644 (file)
        \matrix (main) [memory] {
                & |[descr]| {\rm high addresses} \\
                & || heap\\
-               & || $\downarrow$\\
+               & || {\normalsize $\downarrow$}\\
                & || \ldots\\
-               & || $\uparrow$\\
+               & || {\normalsize $\uparrow$}\\
                & || stack\\
-               & || $\uparrow$ \\
+               & || {\normalsize $\uparrow$}\\
                & || tasks \\
                & |[descr]| {\rm low addresses}\\
        };
-       \matrix (heap) [right=of main,memory] {
+       \matrix (heap) [right=of main,memory,yshift=2em] {
                & || tree\textsubscript{0}\\
                & || tree\textsubscript{1}\\
                & || tree\textsubscript{\ldots}\\
                & || tree\textsubscript{n}\\
        };
+       \matrix (global) [left=of main,memory,yshift=2em] {
+               & || task\textsubscript{n}\\
+               & || task\textsubscript{\ldots}\\
+               & || task\textsubscript{1}\\
+               & || task\textsubscript{0}\\
+       };
        \draw[dashed] (main-2-2.north east) -- (heap-1-2.north west);
        \draw[dashed] (main-3-2.south east) -- (heap-4-2.south west);
+
+       \draw[dashed] (main-7-2.north west) -- (global-1-2.north east);
+       \draw[dashed] (main-8-2.south west) -- (global-4-2.south east);
+
+%      \node (tree) [right=of heap] {
+%\begin{lstlisting}
+%struct TaskTree {
+%      enum BCTaskType_c task_type;
+%      bool trash;
+%      uint16_t refresh_min;
+%      uint16_t refresh_max;
+%      struct TaskTree *parent;
+%      union {
+%              ...
+%              uint16_t readd;
+%              ...
+%              struct {
+%                      struct TaskTree *lhs;
+%                      struct TaskTree *rhs;
+%              } tand;
+%              ...
+%      } data;\end{lstlisting}
+%      };
+%
+%      \draw[dashed] (tree.north west) -- (heap-1-2.north east);
+%      \draw[dashed] (tree.south west) -- (heap-1-2.south east);
 \end{tikzpicture}
 \end{document}