\chapter{Introduction}

\noindent
====================

Writing Points:
\begin{itemize}
\item
Introduce dynamic memory allocation with brief background.
\item
Scope of the thesis.
\item
Importance of memory allocation and micro-benchmark suite.
\item
Research problem.
\item
Research objectives.
\item
The vision behind cfa-malloc.
\item
An outline of the thesis.
\end{itemize}

\noindent
====================

\section{Introduction}
Dynamic memory allocation and management is one of the core features of C. It gives programmer the freedom to allocate, free, use, and manage dynamic memory himself. The programmer is not given the complete control of the dynamic memory management instead an interface of memory allocator is given to the progrmmer that can be used to allocate/free dynamic memory for the application's use.

Memory allocator is a layer between thr programmer and the system. Allocator gets dynamic memory from the system in heap/mmap area of application storage and manages it for programmer's use.

GNU C Library (FIX ME: cite this) provides an interchangeable memory allocator that can be replaced with a custom memory allocator that supports required features and fulfills application's custom needs. It also allows others to innovate in memory allocation and design their own memory allocator. GNU C Library has set guidelines that should be followed when designing a standalone memory allocator. GNU C Library requires new memory allocators to have atlease following set of functions in their allocator's interface:

\begin{itemize}
\item
malloc: it allocates and returns a chunk of dynamic memory of requested size (FIX ME: cite man page).
\item
calloc: it allocates and returns an array in dynamic memory of requested size (FIX ME: cite man page).
\item
realloc: it reallocates and returns an already allocated chunk of dynamic memory to a new size (FIX ME: cite man page).
\item
free: it frees an already allocated piece of dynamic memory (FIX ME: cite man page).
\end{itemize}

In addition to the above functions, GNU C Library also provides some more functions to increase the usability of the dynamic memory allocator. Most standalone allocators also provide all or some of the above additional functions.

\begin{itemize}
\item
aligned\_alloc
\item
malloc\_usable\_size
\item
memalign
\item
posix\_memalign
\item
pvalloc
\item
valloc
\end{itemize}

With the rise of concurrent applications, memory allocators should be able to fulfill dynamic memory requests from multiple threads in parallel without causing contention on shared resources. There needs to be a set of a standard benchmarks that can be used to evaluate an allocator's performance in different scenerios.

\section{Research Objectives}
Our research objective in this thesis is to:

\begin{itemize}
\item
Design a lightweight concurrent memory allocator with added features and usability that are currently not present in the other memory allocators.
\item
Design a suite of benchmarks to evalute multiple aspects of a memory allocator.
\end{itemize}

\section{An outline of the thesis}
LAST FIX ME: add outline at the end