MCPcopy Create free account
hub / github.com/HoShiMin/Kernel-Bridge / HeapObject

Class HeapObject

Kernel-Bridge/API/MemoryUtils.h:129–155  ·  view source on GitHub ↗

Class for simplification of heap using:

Source from the content-addressed store, hash-verified

127
128 // Class for simplification of heap using:
129 class HeapObject final {
130 private:
131 PVOID HeapHandle;
132 public:
133 _IRQL_requires_max_(APC_LEVEL)
134 HeapObject();
135
136 _IRQL_requires_max_(APC_LEVEL)
137 ~HeapObject();
138
139 BOOLEAN IsHeapValid() const;
140
141 _IRQL_requires_max_(APC_LEVEL)
142 PVOID Alloc(SIZE_T Size, BOOLEAN ZeroMemory = TRUE) const;
143
144 _IRQL_requires_max_(APC_LEVEL)
145 VOID Free(PVOID Address) const;
146
147 _IRQL_requires_max_(APC_LEVEL)
148 LPSTR AllocAnsiString(SIZE_T Characters) const;
149
150 _IRQL_requires_max_(APC_LEVEL)
151 LPWSTR AllocWideString(SIZE_T Characters) const;
152
153 _IRQL_requires_max_(APC_LEVEL)
154 PVOID AllocArray(SIZE_T ElementSize, SIZE_T ElementsCount) const;
155 };
156}
157
158namespace PhysicalMemory {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected