DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
CDataAlloc2< Kind > Class Template Reference

#include <dataalloc.hpp>

Public Member Functions

 CDataAlloc2 (int limit=-1)
 
u_char * Alloc (int quads)
 
u_char * Alloc64 (int quads)
 
void Align64 ()
 
void Reset ()
 

Public Attributes

u_char * base
 
u_char * buffer
 
int used
 
int limit
 

Detailed Description

template<int Kind>
class CDataAlloc2< Kind >

Allocates sixteen-byte units from an externally supplied buffer.

Definition at line 22 of file dataalloc.hpp.

Member Function Documentation

◆ Reset()

template<int Kind>
void CDataAlloc2< Kind >::Reset ( )
inline

Hands the whole arena back, without touching what is in it.

Definition at line 36 of file dataalloc.hpp.

Member Data Documentation

◆ base

template<int Kind>
u_char* CDataAlloc2< Kind >::base

Start of the allocator-owned storage.

Definition at line 24 of file dataalloc.hpp.

◆ buffer

template<int Kind>
u_char* CDataAlloc2< Kind >::buffer

Storage the constructor starts the arena's base at.

Definition at line 25 of file dataalloc.hpp.

◆ used

template<int Kind>
int CDataAlloc2< Kind >::used

Number of occupied quadwords.

Definition at line 26 of file dataalloc.hpp.

◆ limit

template<int Kind>
int CDataAlloc2< Kind >::limit

Maximum number of available quadwords.

Definition at line 27 of file dataalloc.hpp.