\documentclass[11pt]{letter}
\usepackage[margin=2cm]{geometry}
\geometry{a4paper}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\usepackage{bytefield}
\usepackage{xcolor}

% facilitates the creation of memory maps. Start address at the bottom, end address at the top.
% syntax: \memsection{end address}{start address}{height in lines}{text in box}
\newcommand{\memsection}[4]{
\bytefieldsetup{bitheight=#3\baselineskip}    % define the height of the memsection
\bitbox[]{14}{
\texttt{#1}     % print end address
\\ \vspace{#3\baselineskip} \vspace{-2\baselineskip} \vspace{-#3pt} % do some spacing
\texttt{#2} % print start address
}
\bitbox{32}{#4} % print box with caption
}

\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

\title{\textsc{x86_64} Memory Map}

\begin{document}

The C library reserves all user memory from \texttt{0000 7800 0000 0000} up to the user/kernel boundary of \texttt{0000 7fff 0000 0000}. It's broken down as follows:

\begin{bytefield}{32}		
	%%%
	\memsection{0000 7fff ffff ffff}{0000 7fff 0000 0000}{2}{Kernel info region}\\
	
	%%%
	\memsection{0000 7ffe ffff ffff}{0000 7ff1 0000 0000}{2}{\sc -- reseved --}\\
	
	\memsection{0000 7ff0 ffff ffff}{0000 7ff0 0000 0000}{2}{\texttt{arc4random} state}\\
	
	\memsection{0000 7fef ffff ffff}{0000 7c00 0000 0000}{2}{\sc -- reseved --}\\
	
	\memsection{0000 7bff ffff ffff}{0000 7800 0000 0000}{8}{Heap (4 TB)}\\
\end{bytefield}

All sections marked as reserved are currently not mapped.

User applications \textit{must not} rely on the C library using a particular memory layout as described. It should function with any userspace address, and not assume that the C library will return memory mapped in the ranges specified in this document.

\end{document}  