Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ BufferAllocated()

unsafe void System.Buffers.ArrayPoolEventSource.BufferAllocated ( int bufferId,
int bufferSize,
int poolId,
int bucketId,
BufferAllocatedReason reason )
inlinepackage

Definition at line 62 of file ArrayPoolEventSource.cs.

63 {
64 EventData* ptr = stackalloc EventData[5];
65 ptr->Size = 4;
66 ptr->DataPointer = (IntPtr)(&bufferId);
67 ptr->Reserved = 0;
68 ptr[1].Size = 4;
69 ptr[1].DataPointer = (IntPtr)(&bufferSize);
70 ptr[1].Reserved = 0;
71 ptr[2].Size = 4;
72 ptr[2].DataPointer = (IntPtr)(&poolId);
73 ptr[2].Reserved = 0;
74 ptr[3].Size = 4;
75 ptr[3].DataPointer = (IntPtr)(&bucketId);
76 ptr[3].Reserved = 0;
77 ptr[4].Size = 4;
78 ptr[4].DataPointer = (IntPtr)(&reason);
79 ptr[4].Reserved = 0;
80 WriteEventCore(2, 5, ptr);
81 }
unsafe void WriteEventCore(int eventId, int eventDataCount, EventData *data)

References System.Diagnostics.Tracing.EventSource.EventData.DataPointer, System.Diagnostics.Tracing.EventSource.EventData.Reserved, System.Diagnostics.Tracing.EventSource.EventData.Size, and System.Diagnostics.Tracing.EventSource.WriteEventCore().

Referenced by System.Buffers.ConfigurableArrayPool< T >.Bucket.Rent(), and System.Buffers.ConfigurableArrayPool< T >.Rent().