public unsafe void *PreDidAlloc(void *pRequest, BOOL fSpyed)
            {
                IMallocSpy current = CurrentSpy;

                return(current is null
                    ? pRequest
                    : current.PreDidAlloc(pRequest, fSpyed));
            }
            public unsafe void *PostRealloc(void *pActual, BOOL fSpyed)
            {
                IMallocSpy current = CurrentSpy;

                return(current is null
                    ? pActual
                    : current.PostRealloc(pActual, fSpyed));
            }
            public unsafe void *PostAlloc(void *pActual)
            {
                IMallocSpy current = CurrentSpy;

                return(current is null
                    ? pActual
                    : current.PostAlloc(pActual));
            }
 public void SetSpy(IMallocSpy spy, bool currentThreadOnly)
 {
     lock (_lock)
     {
         _currentSpy       = spy;
         _registeredThread = currentThreadOnly ? Kernel32.GetCurrentThreadId() : 0;
     }
 }
 static extern int CoRegisterMallocSpy(IMallocSpy mallocSpy);
Exemple #6
0
 public static extern HRESULT CoRegisterMallocSpy(
     IMallocSpy pMallocSpy);