MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / getEntry

Method getEntry

physx/source/physxextensions/src/ExtSharedQueueEntryPool.h:115–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113
114template <class Alloc>
115Ext::SharedQueueEntry* Ext::SharedQueueEntryPool<Alloc>::getEntry(void* objectRef)
116{
117 SharedQueueEntry* e = static_cast<SharedQueueEntry*>(mTaskEntryPtrPool.pop());
118 if (e)
119 {
120 PX_ASSERT(e->mPooledEntry == true);
121 e->mObjectRef = objectRef;
122 return e;
123 }
124 else
125 {
126 Ps::AlignedAllocator<PX_SLIST_ALIGNMENT, Alloc> alignedAlloc;
127 e = reinterpret_cast<SharedQueueEntry*>(alignedAlloc.allocate(sizeof(SharedQueueEntry), __FILE__, __LINE__));
128 if (e)
129 {
130 PX_PLACEMENT_NEW(e, SharedQueueEntry)(objectRef);
131 PX_ASSERT(e->mPooledEntry == false);
132 }
133
134 return e;
135 }
136}
137
138
139template <class Alloc>

Callers 2

submitTaskMethod · 0.45

Calls 2

popMethod · 0.45
allocateMethod · 0.45

Tested by

no test coverage detected