|
Process Hacker
|
Go to the source code of this file.
Data Structures | |
| struct | _PH_FP_BLOCK_HEADER |
| struct | _PH_FP_SEGMENT_HEADER |
| struct | _PH_FP_FILE_HEADER |
| struct | _PH_FILE_POOL_PARAMETERS |
| struct | _PH_FILE_POOL |
Macros | |
| #define | PH_FP_BITMAP_SIZE 64 |
| The number of 32-bit integers used for each allocation bitmap. | |
| #define | PH_FP_BITMAP_SIZE_SHIFT 6 |
| The power-of-two index of the bitmap size. | |
| #define | PH_FP_BLOCK_COUNT (PH_FP_BITMAP_SIZE * 32) |
| The number of blocks that are available in each segment. | |
| #define | PH_FP_BLOCK_COUNT_SHIFT (PH_FP_BITMAP_SIZE_SHIFT + 5) |
| The power-of-two index of the block count. | |
| #define | PH_FP_FREE_LIST_COUNT 8 |
| The number of free lists for segments. | |
| #define | PH_FP_BLOCK_LARGE_ALLOCATION 0x1 |
| The block is the beginning of a large allocation (one that spans several segments). | |
| #define | PH_FP_MAGIC ('loPF') |
Typedefs | |
| typedef struct _PH_FP_BLOCK_HEADER | PH_FP_BLOCK_HEADER |
| typedef struct _PH_FP_BLOCK_HEADER * | PPH_FP_BLOCK_HEADER |
| typedef struct _PH_FP_SEGMENT_HEADER | PH_FP_SEGMENT_HEADER |
| typedef struct _PH_FP_SEGMENT_HEADER * | PPH_FP_SEGMENT_HEADER |
| typedef struct _PH_FP_FILE_HEADER | PH_FP_FILE_HEADER |
| typedef struct _PH_FP_FILE_HEADER * | PPH_FP_FILE_HEADER |
| typedef struct _PH_FILE_POOL_PARAMETERS | PH_FILE_POOL_PARAMETERS |
| typedef struct _PH_FILE_POOL_PARAMETERS * | PPH_FILE_POOL_PARAMETERS |
| typedef struct _PH_FILE_POOL | PH_FILE_POOL |
| typedef struct _PH_FILE_POOL * | PPH_FILE_POOL |
Functions | |
| NTSTATUS | PhCreateFilePool (_Out_ PPH_FILE_POOL *Pool, _In_ HANDLE FileHandle, _In_ BOOLEAN ReadOnly, _In_opt_ PPH_FILE_POOL_PARAMETERS Parameters) |
| Creates or opens a file pool. | |
| NTSTATUS | PhCreateFilePool2 (_Out_ PPH_FILE_POOL *Pool, _In_ PWSTR FileName, _In_ BOOLEAN ReadOnly, _In_ ULONG ShareAccess, _In_ ULONG CreateDisposition, _In_opt_ PPH_FILE_POOL_PARAMETERS Parameters) |
| Creates or opens a file pool. | |
| VOID | PhDestroyFilePool (_In_ _Post_invalid_ PPH_FILE_POOL Pool) |
| Frees resources used by a file pool instance. | |
| PVOID | PhAllocateFilePool (_Inout_ PPH_FILE_POOL Pool, _In_ ULONG Size, _Out_opt_ PULONG Rva) |
| Allocates a block from a file pool. | |
| VOID | PhFreeFilePool (_Inout_ PPH_FILE_POOL Pool, _In_ PVOID Block) |
| Frees a block allocated by PhAllocateFilePool(). | |
| BOOLEAN | PhFreeFilePoolByRva (_Inout_ PPH_FILE_POOL Pool, _In_ ULONG Rva) |
| Frees a block allocated by PhAllocateFilePool(). | |
| VOID | PhReferenceFilePool (_Inout_ PPH_FILE_POOL Pool, _In_ PVOID Address) |
| Increments the reference count for the specified address. | |
| VOID | PhDereferenceFilePool (_Inout_ PPH_FILE_POOL Pool, _In_ PVOID Address) |
| Decrements the reference count for the specified address. | |
| PVOID | PhReferenceFilePoolByRva (_Inout_ PPH_FILE_POOL Pool, _In_ ULONG Rva) |
| Obtains a pointer for a relative virtual address, incrementing the reference count of the address. | |
| BOOLEAN | PhDereferenceFilePoolByRva (_Inout_ PPH_FILE_POOL Pool, _In_ ULONG Rva) |
| Decrements the reference count for the specified relative virtual address. | |
| ULONG | PhEncodeRvaFilePool (_In_ PPH_FILE_POOL Pool, _In_ PVOID Address) |
| Obtains a relative virtual address for a pointer. | |
| VOID | PhGetUserContextFilePool (_In_ PPH_FILE_POOL Pool, _Out_ PULONGLONG Context) |
| Retrieves user data. | |
| VOID | PhSetUserContextFilePool (_Inout_ PPH_FILE_POOL Pool, _In_ PULONGLONG Context) |
| Stores user data. | |
| #define PH_FP_BITMAP_SIZE 64 |
The number of 32-bit integers used for each allocation bitmap.
Definition at line 20 of file filepool.h.
| #define PH_FP_BITMAP_SIZE_SHIFT 6 |
The power-of-two index of the bitmap size.
Definition at line 22 of file filepool.h.
| #define PH_FP_BLOCK_COUNT (PH_FP_BITMAP_SIZE * 32) |
The number of blocks that are available in each segment.
Definition at line 24 of file filepool.h.
| #define PH_FP_BLOCK_COUNT_SHIFT (PH_FP_BITMAP_SIZE_SHIFT + 5) |
The power-of-two index of the block count.
Definition at line 26 of file filepool.h.
| #define PH_FP_BLOCK_LARGE_ALLOCATION 0x1 |
The block is the beginning of a large allocation (one that spans several segments).
Definition at line 32 of file filepool.h.
| #define PH_FP_FREE_LIST_COUNT 8 |
The number of free lists for segments.
Definition at line 28 of file filepool.h.
| #define PH_FP_MAGIC ('loPF') |
Definition at line 52 of file filepool.h.
| typedef struct _PH_FILE_POOL PH_FILE_POOL |
| typedef struct _PH_FILE_POOL_PARAMETERS PH_FILE_POOL_PARAMETERS |
| typedef struct _PH_FP_BLOCK_HEADER PH_FP_BLOCK_HEADER |
| typedef struct _PH_FP_FILE_HEADER PH_FP_FILE_HEADER |
| typedef struct _PH_FP_SEGMENT_HEADER PH_FP_SEGMENT_HEADER |
| typedef struct _PH_FILE_POOL * PPH_FILE_POOL |
| typedef struct _PH_FILE_POOL_PARAMETERS * PPH_FILE_POOL_PARAMETERS |
| typedef struct _PH_FP_BLOCK_HEADER * PPH_FP_BLOCK_HEADER |
| typedef struct _PH_FP_FILE_HEADER * PPH_FP_FILE_HEADER |
| typedef struct _PH_FP_SEGMENT_HEADER * PPH_FP_SEGMENT_HEADER |
| PVOID PhAllocateFilePool | ( | _Inout_ PPH_FILE_POOL | Pool, |
| _In_ ULONG | Size, | ||
| _Out_opt_ PULONG | Rva | ||
| ) |
Allocates a block from a file pool.
| Pool | The file pool. |
| Size | The number of bytes to allocate. |
| Rva | A variable which receives the relative virtual address of the allocated block. |
Definition at line 419 of file filepool.c.
| NTSTATUS PhCreateFilePool | ( | _Out_ PPH_FILE_POOL * | Pool, |
| _In_ HANDLE | FileHandle, | ||
| _In_ BOOLEAN | ReadOnly, | ||
| _In_opt_ PPH_FILE_POOL_PARAMETERS | Parameters | ||
| ) |
Creates or opens a file pool.
| Pool | A variable which receives the file pool instance. |
| FileHandle | A handle to the file. |
| ReadOnly | TRUE to disallow writes to the file. |
| Parameters | Parameters for on-disk and runtime structures. |
Definition at line 93 of file filepool.c.
| NTSTATUS PhCreateFilePool2 | ( | _Out_ PPH_FILE_POOL * | Pool, |
| _In_ PWSTR | FileName, | ||
| _In_ BOOLEAN | ReadOnly, | ||
| _In_ ULONG | ShareAccess, | ||
| _In_ ULONG | CreateDisposition, | ||
| _In_opt_ PPH_FILE_POOL_PARAMETERS | Parameters | ||
| ) |
Creates or opens a file pool.
| Pool | A variable which receives the file pool instance. |
| FileName | The file name of the file pool. |
| ReadOnly | TRUE to disallow writes to the file. |
| ShareAccess | The file access granted to other threads. |
| CreateDisposition | The action to perform if the file does or does not exist. See PhCreateFileWin32() for more information. |
| Parameters | Parameters for on-disk and runtime structures. |
Definition at line 265 of file filepool.c.
| VOID PhDereferenceFilePool | ( | _Inout_ PPH_FILE_POOL | Pool, |
| _In_ PVOID | Address | ||
| ) |
Decrements the reference count for the specified address.
| Pool | The file pool. |
| Address | An address. |
Definition at line 618 of file filepool.c.
| BOOLEAN PhDereferenceFilePoolByRva | ( | _Inout_ PPH_FILE_POOL | Pool, |
| _In_ ULONG | Rva | ||
| ) |
Decrements the reference count for the specified relative virtual address.
| Pool | The file pool. |
| Rva | A relative virtual address. |
Definition at line 664 of file filepool.c.
| VOID PhDestroyFilePool | ( | _In_ _Post_invalid_ PPH_FILE_POOL | Pool | ) |
Frees resources used by a file pool instance.
| Pool | The file pool. |
Definition at line 321 of file filepool.c.
| ULONG PhEncodeRvaFilePool | ( | _In_ PPH_FILE_POOL | Pool, |
| _In_ PVOID | Address | ||
| ) |
Obtains a relative virtual address for a pointer.
| Pool | The file pool. |
| Address | A pointer. |
Definition at line 692 of file filepool.c.
| VOID PhFreeFilePool | ( | _Inout_ PPH_FILE_POOL | Pool, |
| _In_ PVOID | Block | ||
| ) |
Frees a block allocated by PhAllocateFilePool().
| Pool | The file pool. |
| Block | A pointer to the block. The pointer is no longer valid after you call this function. Do not use PhDereferenceFilePool() or PhDereferenceFilePoolByRva(). |
Definition at line 549 of file filepool.c.
| BOOLEAN PhFreeFilePoolByRva | ( | _Inout_ PPH_FILE_POOL | Pool, |
| _In_ ULONG | Rva | ||
| ) |
Frees a block allocated by PhAllocateFilePool().
| Pool | The file pool. |
| Rva | The relative virtual address of the block. |
Definition at line 573 of file filepool.c.
| VOID PhGetUserContextFilePool | ( | _In_ PPH_FILE_POOL | Pool, |
| _Out_ PULONGLONG | Context | ||
| ) |
Retrieves user data.
| Pool | The file pool. |
| Context | A variable which receives the user data. |
Definition at line 716 of file filepool.c.
| VOID PhReferenceFilePool | ( | _Inout_ PPH_FILE_POOL | Pool, |
| _In_ PVOID | Address | ||
| ) |
Increments the reference count for the specified address.
| Pool | The file pool. |
| Address | An address. |
Definition at line 604 of file filepool.c.
| PVOID PhReferenceFilePoolByRva | ( | _Inout_ PPH_FILE_POOL | Pool, |
| _In_ ULONG | Rva | ||
| ) |
Obtains a pointer for a relative virtual address, incrementing the reference count of the address.
| Pool | The file pool. |
| Rva | A relative virtual address. |
Definition at line 633 of file filepool.c.
| VOID PhSetUserContextFilePool | ( | _Inout_ PPH_FILE_POOL | Pool, |
| _In_ PULONGLONG | Context | ||
| ) |
Stores user data.
| Pool | The file pool. |
| Context | A variable which contains the user data. |
Definition at line 730 of file filepool.c.