\documentclass{standalone}

% Diagrams
\usepackage{tikz}
\usetikzlibrary{positioning,fit}

\tikzset{
	minimum width=7em,
	minimum height=1em,
	node distance=-\pgflinewidth,
}

\begin{document}
\begin{tikzpicture}
	% main memory
	\node (main) [] {Main memory};
	\node (high) [below=of main] {High};
	\node (tt0)  [draw,below=of high] {Tree\textsubscript{0}};
	\node (tt1)  [draw,below=of tt0]  {Tree\textsubscript{1}};
	\node (ttd)  [draw,below=of tt1]  {Tree\textsubscript{\ldots}};
	\node (nothing)[draw,below=of ttd,minimum height=2em] {\ldots};
	\node (stackfd)[draw,below=of nothing] {Stackframe\textsubscript{\ldots}};
	\node (stackf1)[draw,below=of stackfd] {Stackframe\textsubscript{1}};
	\node (stackf0)[draw,below=of stackf1] {Stackframe\textsubscript{0}};
	\node (tn)   [draw,below=of stackf0]{Task\textsubscript{n}};
	\node (td)   [draw,below=of tn]   {Task\textsubscript{\ldots}};
	\node (t1)   [draw,below=of td]   {Task\textsubscript{1}};
	\node (t0)   [draw,below=of t1]   {Task\textsubscript{0}};
	\node (low)  [below=of t0] {High};

	% tasktree
	\node (treett) [draw,node distance=4em,right=of tt0,label=above:{struct TaskTree}] {task type};
	\node (treetrash) [draw,below=of treett] {trash};
	\node (treeptr) [draw,below=of treetrash] {parent\textbullet};
	\node (treedata) [draw,below=of treeptr,minimum height=2em] {data};

	\draw [dashed] (tt0.north east) -- (treett.north west);
	\draw [dashed] (tt0.south east) -- (treedata.south west);

	% task
	\node (taskdata)   [draw,node distance=4em,minimum height=2em,left=of tt0,label=above:{struct MTask}] {data};
	\node (taskcodep)  [draw,below=of taskdata] {bytecode\textbullet};
	\node (taskcode)   [draw,below=of taskcodep] {$\|$bytecode$\|$};
	\node (taskperiphp)[draw,below=of taskcode] {peripherals\textbullet};
	\node (taskperiph) [draw,below=of taskperiphp] {$\|$peripherals$\|$};
	\node (tasksharesp)[draw,below=of taskperiph] {shares\textbullet};
	\node (taskshares) [draw,below=of tasksharesp] {$\|$shares$\|$};
	\node (taskvalp)   [draw,below=of taskshares] {value\textbullet};
	\node (taskval)    [draw,below=of taskvalp] {$\|$value$\|$};
	\node (taskstab)   [draw,below=of taskval] {stability};
	\node (tasktree)   [draw,below=of taskstab] {tree\textbullet};
	\node (taskid)     [draw,below=of tasktree] {taskid};

	\draw [dashed] (t0.north west) -- (taskdata.north east);
	\draw [dashed] (t0.south west) -- (taskid.south east);

	% taskdata
	\node (bytecoden) [draw,node distance=4em,minimum height=2em,left=of taskdata] {bytecode\textsubscript{n}};
	\node (bytecoded) [draw,below=of bytecoden] {bytecode\textsubscript{\ldots}};
	\node (bytecode0) [draw,below=of bytecoded] {bytecode\textsubscript{0}};
	\node (periphn) [draw,below=of bytecode0] {periph\textsubscript{n}};
	\node (periphd) [draw,below=of periphn] {periph\textsubscript{\ldots}};
	\node (periph0) [draw,below=of periphd] {periph\textsubscript{0}};
	\node (sharen) [draw,below=of periph0] {share\textsubscript{n}};
	\node (shared) [draw,below=of sharen] {share\textsubscript{\ldots}};
	\node (share0) [draw,below=of shared] {share\textsubscript{0}};
	\node (valuen) [draw,below=of share0] {value\textsubscript{n}};
	\node (valued) [draw,below=of valuen] {value\textsubscript{\ldots}};
	\node (value0) [draw,below=of valued] {value\textsubscript{0}};

	\draw [dashed] (taskdata.north west) -- (bytecoden.north east);
	\draw [dashed] (taskdata.south west) -- (value0.south east);

	% Pointers
	\draw [->] (taskperiphp.west) -- (periph0.east);
	\draw [->] (tasksharesp.west) -- (share0.east);
	\draw [->] (taskvalp.west) -- (value0.east);
	\draw [->] (taskcodep.west) -- (bytecode0.east);

	\draw [->] (tasktree.east) -- (tt0.west);
	\draw [->] (treeptr.west) -- (ttd.east);

	% Stack
	\node (exprd)  [draw,minimum height=2em,node distance=2em,below=of treedata] {expr};
	\node (pcd)    [draw,below=of exprd] {pc};
	\node (fpd)    [draw,below=of pcd] {fp};
	\node (spd)    [draw,below=of fpd] {sp};
	\node (arg0)  [draw,below=of spd] {arg\textsubscript{0}};
	\node (arg1)  [draw,below=of arg0] {arg\textsubscript{1}};
	\node (argd)  [draw,minimum height=2em,below=of arg1] {arg\textsubscript{\ldots}};

	\draw [dashed] (stackf0.north east) -- (exprd.north west);
	\draw [dashed] (stackf0.south east) -- (argd.south west);

\end{tikzpicture}
\end{document}
