Add delete operator
Based on a patch by Sandy Stutsman <sstutsma@redhat.com> Signed-off-by: Javier Celaya <javier.celaya@flexvdi.com> Signed-off-by: Sameeh Jubran <sameeh@daynix.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
f7298659ce
commit
aa48200e49
@ -70,3 +70,14 @@ void __cdecl operator delete[](void* pObject)
|
|||||||
ExFreePool(pObject);
|
ExFreePool(pObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void __cdecl operator delete(void *pObject, size_t s)
|
||||||
|
{
|
||||||
|
PAGED_CODE();
|
||||||
|
|
||||||
|
UNREFERENCED_PARAMETER(s);
|
||||||
|
|
||||||
|
if (pObject != NULL) {
|
||||||
|
ExFreePool(pObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -56,4 +56,5 @@ _When_((PoolType & NonPagedPoolMustSucceed) != 0,
|
|||||||
"Allocation failures cause a system crash"))
|
"Allocation failures cause a system crash"))
|
||||||
void* __cdecl operator new[](size_t Size, POOL_TYPE PoolType = PagedPool);
|
void* __cdecl operator new[](size_t Size, POOL_TYPE PoolType = PagedPool);
|
||||||
void __cdecl operator delete(void* pObject);
|
void __cdecl operator delete(void* pObject);
|
||||||
|
void __cdecl operator delete(void *pObject, size_t s);
|
||||||
void __cdecl operator delete[](void* pObject);
|
void __cdecl operator delete[](void* pObject);
|
||||||
|
Loading…
Reference in New Issue
Block a user