Logo Search packages:      
Sourcecode: blender version File versions  Download package

void * btGenericPoolAllocator::allocate ( size_t  size_bytes  ) 

Allocates memory in pool.

Parameters:
size_bytes size in bytes of the buffer
size_bytes size in bytes of the buffer

Definition at line 215 of file btGenericPoolAllocator.cpp.

References btGenericMemoryPool::allocate().

{
      void * ptr = NULL;

      size_t i = 0;
      while(i<m_pool_count && ptr == NULL)
      {
            ptr = m_pools[i]->allocate(size_bytes);
            ++i;
      }

      if(ptr) return ptr;

      return failback_alloc(size_bytes);
}


Generated by  Doxygen 1.6.0   Back to index