Default implementation of the temp allocator that allocates a large block through malloc upfront.  
 More...
#include <TempAllocator.h>
Default implementation of the temp allocator that allocates a large block through malloc upfront. 
 
◆ TempAllocatorImpl()
Constructs the allocator with a maximum allocatable size of inSize. 
 
 
◆ ~TempAllocatorImpl()
  
  
      
        
          | virtual TempAllocatorImpl::~TempAllocatorImpl  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
Destructor, frees the block. 
 
 
◆ Allocate()
  
  
      
        
          | virtual void * TempAllocatorImpl::Allocate  | 
          ( | 
          uint  | 
          inSize | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
Allocates inSize bytes of memory, returned memory address must be JPH_RVECTOR_ALIGNMENT byte aligned. 
Implements TempAllocator.
 
 
◆ CanAllocate()
  
  
      
        
          | bool TempAllocatorImpl::CanAllocate  | 
          ( | 
          uint  | 
          inSize | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Check if an allocation of inSize can be made in this fixed buffer allocator. 
 
 
◆ Free()
  
  
      
        
          | virtual void TempAllocatorImpl::Free  | 
          ( | 
          void *  | 
          inAddress,  | 
         
        
           | 
           | 
          uint  | 
          inSize  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
Frees inSize bytes of memory located at inAddress. 
Implements TempAllocator.
 
 
◆ GetSize()
  
  
      
        
          | uint TempAllocatorImpl::GetSize  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get the total size of the fixed buffer. 
 
 
◆ GetUsage()
  
  
      
        
          | uint TempAllocatorImpl::GetUsage  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get current usage in bytes of the buffer. 
 
 
◆ IsEmpty()
  
  
      
        
          | bool TempAllocatorImpl::IsEmpty  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Check if no allocations have been made. 
 
 
◆ OwnsMemory()
  
  
      
        
          | bool TempAllocatorImpl::OwnsMemory  | 
          ( | 
          const void *  | 
          inAddress | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Check if memory block at inAddress is owned by this allocator. 
 
 
The documentation for this class was generated from the following file: