Algorithm~\ref{alg:heapObjectFreeOwn} shows how a free request is fulfilled if object ownership is turned on. Algorithm~\ref{alg:heapObjectFreeNoOwn} shows how the same free request is fulfilled without object ownership.

\begin{algorithm}
\caption{Dynamic object free at address A with object ownership}\label{alg:heapObjectFreeOwn}
\begin{algorithmic}[1]
\If {$\textit{A was mmap-ed}$}
	\State $\text{return A's dynamic memory to system using system call munmap}$
\Else
	\State $\text{B} \gets \textit{O's owner}$
	\If {$\textit{B is thread-local heap's bucket}$}
		\State $\text{push A to B's free-list}$
	\Else
		\State $\text{push A to B's away-list}$
	\EndIf
\EndIf
\end{algorithmic}
\end{algorithm}

\begin{algorithm}
\caption{Dynamic object free at address A without object ownership}\label{alg:heapObjectFreeNoOwn}
\begin{algorithmic}[1]
\If {$\textit{A was mmap-ed}$}
	\State $\text{return A's dynamic memory to system using system call munmap}$
\Else
	\State $\text{B} \gets \textit{O's owner}$
	\If {$\textit{B is thread-local heap's bucket}$}
		\State $\text{push A to B's free-list}$
	\Else
		\State $\text{C} \gets \textit{thread local heap's bucket with same size as B}$
		\State $\text{push A to C's free-list}$
	\EndIf
\EndIf
\end{algorithmic}
\end{algorithm}
