Index: doc/theses/mubeen_zulfiqar_MMath/performance.tex
===================================================================
--- doc/theses/mubeen_zulfiqar_MMath/performance.tex	(revision 8eeca775ea588632fd11cdfa6b292652118a10f3)
+++ doc/theses/mubeen_zulfiqar_MMath/performance.tex	(revision 4994d676c9a64dc3ba25d9222801f1ed308692fc)
@@ -454,53 +454,57 @@
 % -consumeS:  100000
 
-\begin{table}[b]
-\centering
-    \begin{tabular}{ |c|c|c| }
-     \hline
-    Memory Allocator & Configuration 1 Result & Configuration 2 Result\\
-     \hline
-    llh & \VRef[Figure]{fig:mem-1-prod-1-cons-100-cfa} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-cfa}\\
-     \hline
-    dl & \VRef[Figure]{fig:mem-1-prod-1-cons-100-dl} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-dl}\\
-     \hline
-    glibc & \VRef[Figure]{fig:mem-1-prod-1-cons-100-glc} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-glc}\\
-     \hline
-    hoard & \VRef[Figure]{fig:mem-1-prod-1-cons-100-hrd} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-hrd}\\
-     \hline
-    je & \VRef[Figure]{fig:mem-1-prod-1-cons-100-je} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-je}\\
-     \hline
-    pt3 & \VRef[Figure]{fig:mem-1-prod-1-cons-100-pt3} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-pt3}\\
-     \hline
-    rp & \VRef[Figure]{fig:mem-1-prod-1-cons-100-rp} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-rp}\\
-     \hline
-    tbb & \VRef[Figure]{fig:mem-1-prod-1-cons-100-tbb} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-tbb}\\
-     \hline
-    \end{tabular}
-\caption{Memory benchmark results}
-\label{table:mem-benchmark-figs}
-\end{table}
+% \begin{table}[b]
+% \centering
+%     \begin{tabular}{ |c|c|c| }
+%      \hline
+%     Memory Allocator & Configuration 1 Result & Configuration 2 Result\\
+%      \hline
+%     llh & \VRef[Figure]{fig:mem-1-prod-1-cons-100-cfa} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-cfa}\\
+%      \hline
+%     dl & \VRef[Figure]{fig:mem-1-prod-1-cons-100-dl} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-dl}\\
+%      \hline
+%     glibc & \VRef[Figure]{fig:mem-1-prod-1-cons-100-glc} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-glc}\\
+%      \hline
+%     hoard & \VRef[Figure]{fig:mem-1-prod-1-cons-100-hrd} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-hrd}\\
+%      \hline
+%     je & \VRef[Figure]{fig:mem-1-prod-1-cons-100-je} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-je}\\
+%      \hline
+%     pt3 & \VRef[Figure]{fig:mem-1-prod-1-cons-100-pt3} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-pt3}\\
+%      \hline
+%     rp & \VRef[Figure]{fig:mem-1-prod-1-cons-100-rp} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-rp}\\
+%      \hline
+%     tbb & \VRef[Figure]{fig:mem-1-prod-1-cons-100-tbb} & \VRef[Figure]{fig:mem-4-prod-4-cons-100-tbb}\\
+%      \hline
+%     \end{tabular}
+% \caption{Memory benchmark results}
+% \label{table:mem-benchmark-figs}
+% \end{table}
+% Table \ref{table:mem-benchmark-figs} shows the list of figures that contain memory benchmark results.
 
 \VRefrange[Figures]{fig:mem-1-prod-1-cons-100-cfa}{fig:mem-4-prod-4-cons-100-tbb} show 16 figures, two figures for each of the 8 allocators, one for each configuration.
-Table \ref{table:mem-benchmark-figs} shows the list of figures that contain memory benchmark results.
-
 Each figure has 2 graphs, one for each experiment environment.
-Each graph has following 5 subgraphs that show program's memory usage and statistics throughout the program lifetime.
-
+Each graph has following 5 subgraphs that show memory usage and statistics throughout the micro-benchmark's lifetime.
 \begin{itemize}
 \item \textit{\textbf{current\_req\_mem(B)}} shows the amount of dynamic memory requested and currently in-use of the benchmark.
-\item \textit{\textbf{heap}}* shows the memory requested by the program (allocator) from the system that lies in the heap area.
-\item \textit{\textbf{mmap\_so}}* shows the memory requested by the program (allocator) from the system that lies in the mmap area.
-\item \textit{\textbf{mmap}}* shows the memory requested by the program (allocator or shared libraries) from the system that lies in the mmap area.
-\item \textit{\textbf{total\_dynamic}} shows the total usage of dynamic memory by the benchmark program which is a sum of heap, mmap, and mmap\_so.
+\item \textit{\textbf{heap}}* shows the memory requested by the program (allocator) from the system that lies in the heap (@sbrk@) area.
+\item \textit{\textbf{mmap\_so}}* shows the memory requested by the program (allocator) from the system that lies in the @mmap@ area.
+\item \textit{\textbf{mmap}}* shows the memory requested by the program (allocator or shared libraries) from the system that lies in the @mmap@ area.
+\item \textit{\textbf{total\_dynamic}} shows the total usage of dynamic memory by the benchmark program, which is a sum of \textit{heap}, \textit{mmap}, and \textit{mmap\_so}.
 \end{itemize}
-
-* These statistics are gathered by monitoring the \textit{/proc/self/maps} file of the process in linux system.
-
-For each subgraph, x-axis shows the time during the program lifetime at which the data point was generated.
-Y-axis shows the memory usage in bytes.
-
-For the experiment, at a certain time in the program's life, the difference between the memory requested by the benchmark (\textit{current\_req\_mem(B)})
-and the memory that the process has received from system (\textit{heap}, \textit{mmap}) should be minimum.
+* These statistics are gathered by monitoring a process's @/proc/self/maps@ file.
+
+The X-axis shows the time when the memory information is polled.
+The Y-axis shows the memory usage in bytes.
+
+For the experiment, at a certain time in the program's life, the difference between the memory requested by the benchmark (\textit{current\_req\_mem(B)}) and the memory that the process has received from system (\textit{heap}, \textit{mmap}) should be minimum.
 This difference is the memory overhead caused by the allocator and shows the level of fragmentation in the allocator.
+
+First, the differences in the shape of the curves between architectures (top ARM, bottom x64) is small, where the differences are in the amount of memory used.
+Hence, it is possible to focus on either the top or bottom graph.
+The heap curve It is possible glib, hoard, jemalloc, ptmalloc3, rpmalloc do not use the sbrk area => only uses mmap.
+
+hoard, tbbmalloc uses more total memory
+
+ptmalloc3 gives memory back to operating system
 
 %mem-1-prod-1-cons-100-cfa.eps
@@ -513,4 +517,13 @@
 \end{figure}
 
+%mem-4-prod-4-cons-100-cfa.eps
+\begin{figure}
+\centering
+    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-cfa} }
+    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-cfa} }
+\caption{Memory benchmark results with 4 producers for llh memory allocator}
+\label{fig:mem-4-prod-4-cons-100-cfa}
+\end{figure}
+
 %mem-1-prod-1-cons-100-dl.eps
 \begin{figure}
@@ -522,4 +535,13 @@
 \end{figure}
 
+%mem-4-prod-4-cons-100-dl.eps
+\begin{figure}
+\centering
+    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-dl} }
+    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-dl} }
+\caption{Memory benchmark results with 4 producers for dl memory allocator}
+\label{fig:mem-4-prod-4-cons-100-dl}
+\end{figure}
+
 %mem-1-prod-1-cons-100-glc.eps
 \begin{figure}
@@ -531,4 +553,13 @@
 \end{figure}
 
+%mem-4-prod-4-cons-100-glc.eps
+\begin{figure}
+\centering
+    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-glc} }
+    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-glc} }
+\caption{Memory benchmark results with 4 producers for glibc memory allocator}
+\label{fig:mem-4-prod-4-cons-100-glc}
+\end{figure}
+
 %mem-1-prod-1-cons-100-hrd.eps
 \begin{figure}
@@ -540,4 +571,13 @@
 \end{figure}
 
+%mem-4-prod-4-cons-100-hrd.eps
+\begin{figure}
+\centering
+    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-hrd} }
+    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-hrd} }
+\caption{Memory benchmark results with 4 producers for hoard memory allocator}
+\label{fig:mem-4-prod-4-cons-100-hrd}
+\end{figure}
+
 %mem-1-prod-1-cons-100-je.eps
 \begin{figure}
@@ -549,4 +589,13 @@
 \end{figure}
 
+%mem-4-prod-4-cons-100-je.eps
+\begin{figure}
+\centering
+    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-je} }
+    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-je} }
+\caption{Memory benchmark results with 4 producers for je memory allocator}
+\label{fig:mem-4-prod-4-cons-100-je}
+\end{figure}
+
 %mem-1-prod-1-cons-100-pt3.eps
 \begin{figure}
@@ -558,4 +607,13 @@
 \end{figure}
 
+%mem-4-prod-4-cons-100-pt3.eps
+\begin{figure}
+\centering
+    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-pt3} }
+    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-pt3} }
+\caption{Memory benchmark results with 4 producers for pt3 memory allocator}
+\label{fig:mem-4-prod-4-cons-100-pt3}
+\end{figure}
+
 %mem-1-prod-1-cons-100-rp.eps
 \begin{figure}
@@ -567,4 +625,13 @@
 \end{figure}
 
+%mem-4-prod-4-cons-100-rp.eps
+\begin{figure}
+\centering
+    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-rp} }
+    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-rp} }
+\caption{Memory benchmark results with 4 producers for rp memory allocator}
+\label{fig:mem-4-prod-4-cons-100-rp}
+\end{figure}
+
 %mem-1-prod-1-cons-100-tbb.eps
 \begin{figure}
@@ -576,67 +643,4 @@
 \end{figure}
 
-%mem-4-prod-4-cons-100-cfa.eps
-\begin{figure}
-\centering
-    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-cfa} }
-    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-cfa} }
-\caption{Memory benchmark results with 4 producers for llh memory allocator}
-\label{fig:mem-4-prod-4-cons-100-cfa}
-\end{figure}
-
-%mem-4-prod-4-cons-100-dl.eps
-\begin{figure}
-\centering
-    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-dl} }
-    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-dl} }
-\caption{Memory benchmark results with 4 producers for dl memory allocator}
-\label{fig:mem-4-prod-4-cons-100-dl}
-\end{figure}
-
-%mem-4-prod-4-cons-100-glc.eps
-\begin{figure}
-\centering
-    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-glc} }
-    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-glc} }
-\caption{Memory benchmark results with 4 producers for glibc memory allocator}
-\label{fig:mem-4-prod-4-cons-100-glc}
-\end{figure}
-
-%mem-4-prod-4-cons-100-hrd.eps
-\begin{figure}
-\centering
-    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-hrd} }
-    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-hrd} }
-\caption{Memory benchmark results with 4 producers for hoard memory allocator}
-\label{fig:mem-4-prod-4-cons-100-hrd}
-\end{figure}
-
-%mem-4-prod-4-cons-100-je.eps
-\begin{figure}
-\centering
-    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-je} }
-    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-je} }
-\caption{Memory benchmark results with 4 producers for je memory allocator}
-\label{fig:mem-4-prod-4-cons-100-je}
-\end{figure}
-
-%mem-4-prod-4-cons-100-pt3.eps
-\begin{figure}
-\centering
-    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-pt3} }
-    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-pt3} }
-\caption{Memory benchmark results with 4 producers for pt3 memory allocator}
-\label{fig:mem-4-prod-4-cons-100-pt3}
-\end{figure}
-
-%mem-4-prod-4-cons-100-rp.eps
-\begin{figure}
-\centering
-    \subfigure[Algol]{ \includegraphics[width=0.95\textwidth]{evaluations/algol-perf-eps/mem-4-prod-4-cons-100-rp} }
-    \subfigure[Nasus]{ \includegraphics[width=0.95\textwidth]{evaluations/nasus-perf-eps/mem-4-prod-4-cons-100-rp} }
-\caption{Memory benchmark results with 4 producers for rp memory allocator}
-\label{fig:mem-4-prod-4-cons-100-rp}
-\end{figure}
-
 %mem-4-prod-4-cons-100-tbb.eps
 \begin{figure}
