\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\-F\-S allocation function pointers.  




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

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


\subsection{Detailed Description}
Physics\-F\-S allocation function pointers. 

(This is for limited, hardcore use. If you don'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're on the cusp of a 64-\/bit transition, and we'll probably be allocating 6 gigabytes like it's nothing sooner or later, and I don't want to change this again at that point. If you're on a 32-\/bit platform and have to downcast, it's okay to return N\-U\-L\-L if the allocation is greater than 4 gigabytes, since you'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}
\index{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator@{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator}!Deinit@{Deinit}}
\index{Deinit@{Deinit}!PHYSFS_Allocator@{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator}}
\subsubsection[{Deinit}]{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ P\-H\-Y\-S\-F\-S\-\_\-\-Allocator\-::\-Deinit)(void)}\label{structPHYSFS__Allocator_a9ee00828d38fcf741814356c214a54fe}
Deinitialize your allocator. Can be N\-U\-L\-L. \index{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator@{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator}!Free@{Free}}
\index{Free@{Free}!PHYSFS_Allocator@{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator}}
\subsubsection[{Free}]{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ P\-H\-Y\-S\-F\-S\-\_\-\-Allocator\-::\-Free)(void $\ast$)}\label{structPHYSFS__Allocator_ad63aeb97ba59185434cd24f6662ea13f}
Free memory from Malloc or Realloc. \index{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator@{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator}!Init@{Init}}
\index{Init@{Init}!PHYSFS_Allocator@{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator}}
\subsubsection[{Init}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ P\-H\-Y\-S\-F\-S\-\_\-\-Allocator\-::\-Init)(void)}\label{structPHYSFS__Allocator_aea7ba8bea9a99b9719ac29bd8352ff51}
Initialize. Can be N\-U\-L\-L. Zero on failure. \index{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator@{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator}!Malloc@{Malloc}}
\index{Malloc@{Malloc}!PHYSFS_Allocator@{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator}}
\subsubsection[{Malloc}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$($\ast$ P\-H\-Y\-S\-F\-S\-\_\-\-Allocator\-::\-Malloc)({\bf P\-H\-Y\-S\-F\-S\-\_\-uint64})}\label{structPHYSFS__Allocator_a0ad5c0a2612ceaadc1ed6d95e8ce66f4}
Allocate like malloc(). \index{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator@{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator}!Realloc@{Realloc}}
\index{Realloc@{Realloc}!PHYSFS_Allocator@{P\-H\-Y\-S\-F\-S\-\_\-\-Allocator}}
\subsubsection[{Realloc}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$($\ast$ P\-H\-Y\-S\-F\-S\-\_\-\-Allocator\-::\-Realloc)(void $\ast$, {\bf P\-H\-Y\-S\-F\-S\-\_\-uint64})}\label{structPHYSFS__Allocator_a7bd602e0ac4c50ad58fbf7c1cf263ed9}
Reallocate like realloc(). 

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