RavEngine
Loading...
Searching...
No Matches
physx::PxAllocationListener Class Referenceabstract

Abstract listener class that listens to allocation and deallocation events from the foundation memory system. More...

#include <PxBroadcast.h>

Inheritance diagram for physx::PxAllocationListener:
[legend]

Public Member Functions

virtual void onAllocation (size_t size, const char *typeName, const char *filename, int line, void *allocatedMemory)=0
 callback when memory is allocated.
 
virtual void onDeallocation (void *allocatedMemory)=0
 callback when memory is deallocated.
 

Detailed Description

Abstract listener class that listens to allocation and deallocation events from the foundation memory system.

Threading: All methods of this class should be thread safe as it can be called from the user thread or the physics processing thread(s).

Member Function Documentation

◆ onAllocation()

virtual void physx::PxAllocationListener::onAllocation ( size_t  size,
const char *  typeName,
const char *  filename,
int  line,
void *  allocatedMemory 
)
pure virtual

callback when memory is allocated.

Parameters
sizeSize of the allocation in bytes.
typeNameType this data is being allocated for.
filenameFile the allocation came from.
linethe allocation came from.
allocatedMemorymemory that will be returned from the allocation.

Implemented in physx::profile::PxProfileMemoryEventBufferImpl, physx::pvdsdk::PvdImpl, and physx::pvdsdk::PsPvd.

◆ onDeallocation()

virtual void physx::PxAllocationListener::onDeallocation ( void *  allocatedMemory)
pure virtual

callback when memory is deallocated.

Parameters
allocatedMemorymemory just before allocation.

Implemented in physx::pvdsdk::PvdImpl, physx::pvdsdk::PsPvd, and physx::profile::PxProfileMemoryEventBufferImpl.


The documentation for this class was generated from the following file: