예제 #1
0
 internal unsafe void BufferAllocated(int bufferId, int bufferSize, int poolId, int bucketId, BufferAllocatedReason reason)
 {
     EventData* payload = stackalloc EventData[5];
     payload[0].Size = sizeof(int);
     payload[0].DataPointer = ((IntPtr)(&bufferId));
     payload[1].Size = sizeof(int);
     payload[1].DataPointer = ((IntPtr)(&bufferSize));
     payload[2].Size = sizeof(int);
     payload[2].DataPointer = ((IntPtr)(&poolId));
     payload[3].Size = sizeof(int);
     payload[3].DataPointer = ((IntPtr)(&bucketId));
     payload[4].Size = sizeof(BufferAllocatedReason);
     payload[4].DataPointer = ((IntPtr)(&reason));
     WriteEventCore(2, 5, payload);
 }
예제 #2
0
        internal unsafe void BufferAllocated(int bufferId, int bufferSize, int poolId, int bucketId, BufferAllocatedReason reason)
        {
            EventData *payload = stackalloc EventData[5];

            payload[0].Size        = sizeof(int);
            payload[0].DataPointer = ((IntPtr)(&bufferId));
            payload[1].Size        = sizeof(int);
            payload[1].DataPointer = ((IntPtr)(&bufferSize));
            payload[2].Size        = sizeof(int);
            payload[2].DataPointer = ((IntPtr)(&poolId));
            payload[3].Size        = sizeof(int);
            payload[3].DataPointer = ((IntPtr)(&bucketId));
            payload[4].Size        = sizeof(BufferAllocatedReason);
            payload[4].DataPointer = ((IntPtr)(&reason));
            WriteEventCore(2, 5, payload);
        }
예제 #3
0
        internal void BufferAllocated(int bufferId, int bufferSize, int poolId, int bucketId, BufferAllocatedReason reason)
        {
            var message = "Buffer allocated (Buffer ID: " + bufferId + ", Buffer size: " + bufferSize + ", Pool ID: " + poolId + ", Bucket ID: " + bucketId + ", Reason: " + reason + ")";

            if (reason == BufferAllocatedReason.Pooled)
            {
                Log.Info("Buffers", message);
            }
            else
            {
                Log.Warning("Buffers", message);
            }
        }
예제 #4
0
 internal void BufferAllocated(int bufferId, int bufferSize, int poolId, int bucketId, BufferAllocatedReason reason)
 {
 }
예제 #5
0
 /// <summary>
 /// Event for when a buffer is allocated by the pool.  In an ideal situation, the number
 /// of BufferAllocated events is significantly smaller than the number of BufferRented and
 /// BufferReturned events.
 /// </summary>
 internal unsafe void BufferAllocated(int bufferId, int bufferSize, int poolId, int bucketId, BufferAllocatedReason reason)
 {
     Debug.LogFormat("BufferAllocated(bufferId:{0},bufferSize:{1},poolId:{2},bucketId:{3},reason:{4})", bufferId, bufferSize, poolId, bucketId, reason);
 }