PxAllocatorCallback Class ReferenceAbstract base class for an application defined memory allocator that can be used by the Nv library.
Public Member Functions
|virtual void *||allocate (size_t size, const char *typeName, const char *filename, int line)=0|
|Allocates size bytes of memory, which must be 16-byte aligned. |
|virtual void||deallocate (void *ptr)=0|
|Frees memory previously allocated by allocate(). |
Detailed DescriptionAbstract base class for an application defined memory allocator that can be used by the Nv library.
- The SDK state should not be modified from within any allocation/free function.
Constructor & Destructor Documentation
Member Function Documentation
|virtual void* PxAllocatorCallback::allocate||(||size_t||size,|
|const char *||typeName,|
|const char *||filename,|
Allocates size bytes of memory, which must be 16-byte aligned.
This method should never return NULL. If you run out of memory, then you should terminate the app or take some other appropriate action.
Threading: This function should be thread safe as it can be called in the context of the user thread and physics processing thread(s).
size Number of bytes to allocate. typeName Name of the datatype that is being allocated filename The source file which allocated the memory line The source line which allocated the memory
- The allocated block of memory.
Implemented in PxDefaultAllocator.
|virtual void PxAllocatorCallback::deallocate||(||void *||ptr||)||
The documentation for this class was generated from the following file:
Copyright © 2008-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com