\section{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator Struct Reference}
\label{structPHYSFS__Allocator}\index{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}}


Physics\+FS allocation function pointers.  




{\ttfamily \#include $<$physfs.\+h$>$}

\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
int($\ast$ \textbf{ Init} )(void)
\item 
void($\ast$ \textbf{ Deinit} )(void)
\item 
void $\ast$($\ast$ \textbf{ Malloc} )(\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64})
\item 
void $\ast$($\ast$ \textbf{ Realloc} )(void $\ast$, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64})
\item 
void($\ast$ \textbf{ Free} )(void $\ast$)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Physics\+FS allocation function pointers. 

(This is for limited, hardcore use. If you don\textquotesingle{}t immediately see a need for it, you can probably ignore this forever.)

You create one of these structures for use with P\+H\+Y\+S\+F\+S\+\_\+set\+Allocator. Allocators are assumed to be reentrant by the caller; please mutex accordingly.

Allocations are always discussed in 64-\/bits, for future expansion...we\textquotesingle{}re on the cusp of a 64-\/bit transition, and we\textquotesingle{}ll probably be allocating 6 gigabytes like it\textquotesingle{}s nothing sooner or later, and I don\textquotesingle{}t want to change this again at that point. If you\textquotesingle{}re on a 32-\/bit platform and have to downcast, it\textquotesingle{}s okay to return N\+U\+LL if the allocation is greater than 4 gigabytes, since you\textquotesingle{}d have to do so anyhow.

\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+set\+Allocator}{p.}{physfs_8h_ae6297d1ae7755b9236b01950bfbb0ef1} 
\end{DoxySeeAlso}


\subsection{Field Documentation}
\mbox{\label{structPHYSFS__Allocator_a34a667936ebcb017a58edfd4695a6e77}} 
\index{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}!Deinit@{Deinit}}
\index{Deinit@{Deinit}!P\+H\+Y\+S\+F\+S\+\_\+\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}}
\subsubsection{Deinit}
{\footnotesize\ttfamily void($\ast$ P\+H\+Y\+S\+F\+S\+\_\+\+Allocator\+::\+Deinit) (void)}

Deinitialize your allocator. Can be N\+U\+LL. \mbox{\label{structPHYSFS__Allocator_ad281f87d133a480afa98182967c7e313}} 
\index{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}!Free@{Free}}
\index{Free@{Free}!P\+H\+Y\+S\+F\+S\+\_\+\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}}
\subsubsection{Free}
{\footnotesize\ttfamily void($\ast$ P\+H\+Y\+S\+F\+S\+\_\+\+Allocator\+::\+Free) (void $\ast$)}

Free memory from Malloc or Realloc. \mbox{\label{structPHYSFS__Allocator_a61dd95a74a5c9557645249b30e41d933}} 
\index{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}!Init@{Init}}
\index{Init@{Init}!P\+H\+Y\+S\+F\+S\+\_\+\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}}
\subsubsection{Init}
{\footnotesize\ttfamily int($\ast$ P\+H\+Y\+S\+F\+S\+\_\+\+Allocator\+::\+Init) (void)}

Initialize. Can be N\+U\+LL. Zero on failure. \mbox{\label{structPHYSFS__Allocator_a470bc12185fbcef62ebf509fdf1870b5}} 
\index{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}!Malloc@{Malloc}}
\index{Malloc@{Malloc}!P\+H\+Y\+S\+F\+S\+\_\+\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}}
\subsubsection{Malloc}
{\footnotesize\ttfamily void$\ast$($\ast$ P\+H\+Y\+S\+F\+S\+\_\+\+Allocator\+::\+Malloc) (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64})}

Allocate like malloc(). \mbox{\label{structPHYSFS__Allocator_abc71951013cda22b8177b831bfaf8579}} 
\index{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}!Realloc@{Realloc}}
\index{Realloc@{Realloc}!P\+H\+Y\+S\+F\+S\+\_\+\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}}
\subsubsection{Realloc}
{\footnotesize\ttfamily void$\ast$($\ast$ P\+H\+Y\+S\+F\+S\+\_\+\+Allocator\+::\+Realloc) (void $\ast$, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64})}

Reallocate like realloc(). 

The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\textbf{ physfs.\+h}\end{DoxyCompactItemize}
