mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 08:53:01 -05:00
sys: FspAlloc and friends are now macros
This commit is contained in:
parent
56a9d37135
commit
73bd8906fc
@ -270,36 +270,12 @@ FAST_IO_ACQUIRE_FOR_CCFLUSH FspAcquireForCcFlush;
|
|||||||
FAST_IO_RELEASE_FOR_CCFLUSH FspReleaseForCcFlush;
|
FAST_IO_RELEASE_FOR_CCFLUSH FspReleaseForCcFlush;
|
||||||
|
|
||||||
/* memory allocation */
|
/* memory allocation */
|
||||||
static inline
|
#define FspAlloc(Size) ExAllocatePoolWithTag(PagedPool, Size, FSP_ALLOC_INTERNAL_TAG)
|
||||||
PVOID FspAlloc(SIZE_T Size)
|
#define FspAllocNonPaged(Size) ExAllocatePoolWithTag(NonPagedPool, Size, FSP_ALLOC_INTERNAL_TAG)
|
||||||
{
|
#define FspFree(Pointer) ExFreePoolWithTag(Pointer, FSP_ALLOC_INTERNAL_TAG)
|
||||||
return ExAllocatePoolWithTag(PagedPool, Size, FSP_ALLOC_INTERNAL_TAG);
|
#define FspAllocExternal(Size) ExAllocatePoolWithTag(PagedPool, Size, FSP_ALLOC_EXTERNAL_TAG)
|
||||||
}
|
#define FspAllocNonPagedExternal(Size) ExAllocatePoolWithTag(NonPagedPool, Size, FSP_ALLOC_EXTERNAL_TAG)
|
||||||
static inline
|
#define FspFreeExternal(Pointer) ExFreePool(Pointer)
|
||||||
PVOID FspAllocNonPaged(SIZE_T Size)
|
|
||||||
{
|
|
||||||
return ExAllocatePoolWithTag(NonPagedPool, Size, FSP_ALLOC_INTERNAL_TAG);
|
|
||||||
}
|
|
||||||
static inline
|
|
||||||
VOID FspFree(PVOID Pointer)
|
|
||||||
{
|
|
||||||
ExFreePoolWithTag(Pointer, FSP_ALLOC_INTERNAL_TAG);
|
|
||||||
}
|
|
||||||
static inline
|
|
||||||
PVOID FspAllocExternal(SIZE_T Size)
|
|
||||||
{
|
|
||||||
return ExAllocatePoolWithTag(PagedPool, Size, FSP_ALLOC_EXTERNAL_TAG);
|
|
||||||
}
|
|
||||||
static inline
|
|
||||||
PVOID FspAllocNonPagedExternal(SIZE_T Size)
|
|
||||||
{
|
|
||||||
return ExAllocatePoolWithTag(NonPagedPool, Size, FSP_ALLOC_EXTERNAL_TAG);
|
|
||||||
}
|
|
||||||
static inline
|
|
||||||
VOID FspFreeExternal(PVOID Pointer)
|
|
||||||
{
|
|
||||||
ExFreePool(Pointer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* hash mix */
|
/* hash mix */
|
||||||
/* Based on the MurmurHash3 fmix32/fmix64 function:
|
/* Based on the MurmurHash3 fmix32/fmix64 function:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user