Go to the source code of this file.
|
struct | _PH_OBJECT_HEADER |
| The object header contains object manager information including the reference count of an object and its type. More...
|
|
struct | _PH_OBJECT_TYPE |
| An object type specifies a kind of object and its delete procedure. More...
|
|
#define PH_OBJECT_FROM_SMALL_FREE_LIST 0x1 |
The object was allocated from the small free list.
Definition at line 29 of file refp.h.
#define PH_OBJECT_FROM_TYPE_FREE_LIST 0x2 |
The object was allocated from the type free list.
Definition at line 31 of file refp.h.
#define PH_OBJECT_TYPE_TABLE_SIZE 256 |
Calculates the total size to allocate for an object.
- Parameters
-
Size | The size of the object to allocate. |
- Returns
- The new size, including space for the object header.
Definition at line 112 of file refp.h.
#define PhObjectHeaderToObject |
( |
|
ObjectHeader | ) |
((PVOID)&((PPH_OBJECT_HEADER)(ObjectHeader))->Body) |
Gets a pointer to an object from an object header.
- Parameters
-
ObjectHeader | A pointer to an object header. |
- Returns
- A pointer to an object.
Definition at line 103 of file refp.h.
Gets a pointer to the object header for an object.
- Parameters
-
Object | A pointer to an object. |
- Returns
- A pointer to the object header of the object.
Definition at line 94 of file refp.h.
The object header contains object manager information including the reference count of an object and its type.
An object type specifies a kind of object and its delete procedure.
Allocates storage for an object.
- Parameters
-
ObjectType | The type of the object. |
ObjectSize | The size of the object, excluding the header. |
Definition at line 450 of file ref.c.
Queues an object for deletion.
- Parameters
-
ObjectHeader | A pointer to the object header of the object to delete. |
Definition at line 535 of file ref.c.
NTSTATUS PhpDeferDeleteObjectRoutine |
( |
_In_ PVOID |
Parameter | ) |
|
Removes and frees objects from the to-free list.
Definition at line 555 of file ref.c.
Calls the delete procedure for an object and frees its allocated storage.
- Parameters
-
ObjectHeader | A pointer to the object header of an allocated object. |
Definition at line 487 of file ref.c.
FORCEINLINE BOOLEAN PhpInterlockedIncrementSafe |
( |
_Inout_ PLONG |
RefCount | ) |
|
Increments a reference count, but will never increment from 0 to 1.
- Parameters
-
RefCount | A pointer to a reference count. |
Definition at line 142 of file refp.h.