Process Hacker
memlist.c File Reference
#include <phapp.h>
#include <settings.h>
#include <extmgri.h>
#include <phplug.h>
#include <emenu.h>

Go to the source code of this file.

Macros

#define SORT_FUNCTION(Column)   PhpMemoryTreeNewCompare##Column
 
#define BEGIN_SORT_FUNCTION(Column)
 
#define END_SORT_FUNCTION
 

Functions

VOID PhpClearMemoryList (_Inout_ PPH_MEMORY_LIST_CONTEXT Context)
 
VOID PhpDestroyMemoryNode (_In_ PPH_MEMORY_NODE MemoryNode)
 
LONG PhpMemoryTreeNewPostSortFunction (_In_ LONG Result, _In_ PVOID Node1, _In_ PVOID Node2, _In_ PH_SORT_ORDER SortOrder)
 
BOOLEAN NTAPI PhpMemoryTreeNewCallback (_In_ HWND hwnd, _In_ PH_TREENEW_MESSAGE Message, _In_opt_ PVOID Parameter1, _In_opt_ PVOID Parameter2, _In_opt_ PVOID Context)
 
VOID PhInitializeMemoryList (_In_ HWND ParentWindowHandle, _In_ HWND TreeNewHandle, _Out_ PPH_MEMORY_LIST_CONTEXT Context)
 
VOID PhDeleteMemoryList (_In_ PPH_MEMORY_LIST_CONTEXT Context)
 
VOID PhLoadSettingsMemoryList (_Inout_ PPH_MEMORY_LIST_CONTEXT Context)
 
VOID PhSaveSettingsMemoryList (_Inout_ PPH_MEMORY_LIST_CONTEXT Context)
 
VOID PhSetOptionsMemoryList (_Inout_ PPH_MEMORY_LIST_CONTEXT Context, _In_ BOOLEAN HideFreeRegions)
 
PPH_MEMORY_NODE PhpAddAllocationBaseNode (_Inout_ PPH_MEMORY_LIST_CONTEXT Context, _In_ PVOID AllocationBase)
 
PPH_MEMORY_NODE PhpAddRegionNode (_Inout_ PPH_MEMORY_LIST_CONTEXT Context, _In_ PPH_MEMORY_ITEM MemoryItem)
 
VOID PhpCopyMemoryRegionTypeInfo (_In_ PPH_MEMORY_ITEM Source, _Inout_ PPH_MEMORY_ITEM Destination)
 
VOID PhReplaceMemoryList (_Inout_ PPH_MEMORY_LIST_CONTEXT Context, _In_opt_ PPH_MEMORY_ITEM_LIST List)
 
VOID PhUpdateMemoryNode (_In_ PPH_MEMORY_LIST_CONTEXT Context, _In_ PPH_MEMORY_NODE MemoryNode)
 
PPH_STRING PhpGetMemoryRegionUseText (_In_ PPH_MEMORY_ITEM MemoryItem)
 
VOID PhpUpdateMemoryNodeUseText (_Inout_ PPH_MEMORY_NODE MemoryNode)
 
PPH_STRING PhpFormatSizeIfNonZero (_In_ ULONG64 Size)
 
 BEGIN_SORT_FUNCTION (BaseAddress)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (Type)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (Size)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (Protection)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (Use)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (TotalWs)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (PrivateWs)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (ShareableWs)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (SharedWs)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (LockedWs)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (Committed)
 
END_SORT_FUNCTION BEGIN_SORT_FUNCTION (Private)
 
PPH_MEMORY_NODE PhGetSelectedMemoryNode (_In_ PPH_MEMORY_LIST_CONTEXT Context)
 
VOID PhGetSelectedMemoryNodes (_In_ PPH_MEMORY_LIST_CONTEXT Context, _Out_ PPH_MEMORY_NODE **MemoryNodes, _Out_ PULONG NumberOfMemoryNodes)
 
VOID PhDeselectAllMemoryNodes (_In_ PPH_MEMORY_LIST_CONTEXT Context)
 

Macro Definition Documentation

#define BEGIN_SORT_FUNCTION (   Column)
Value:
static int __cdecl PhpMemoryTreeNewCompare##Column( \
_In_ void *_context, \
_In_ const void *_elem1, \
_In_ const void *_elem2 \
) \
{ \
PPH_MEMORY_NODE node1 = *(PPH_MEMORY_NODE *)_elem1; \
PPH_MEMORY_NODE node2 = *(PPH_MEMORY_NODE *)_elem2; \
PPH_MEMORY_ITEM memoryItem1 = node1->MemoryItem; \
PPH_MEMORY_ITEM memoryItem2 = node2->MemoryItem; \
int sortResult = 0;

Definition at line 448 of file memlist.c.

#define END_SORT_FUNCTION
Value:
if (sortResult == 0) \
sortResult = uintptrcmp((ULONG_PTR)memoryItem1->BaseAddress, (ULONG_PTR)memoryItem2->BaseAddress); \
\
return PhModifySort(sortResult, ((PPH_MEMORY_LIST_CONTEXT)_context)->TreeNewSortOrder); \
}

Definition at line 460 of file memlist.c.

#define SORT_FUNCTION (   Column)    PhpMemoryTreeNewCompare##Column

Definition at line 446 of file memlist.c.

Function Documentation

BEGIN_SORT_FUNCTION ( BaseAddress  )

Definition at line 480 of file memlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( Type  )

Definition at line 486 of file memlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( Size  )

Definition at line 495 of file memlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( Protection  )

Definition at line 501 of file memlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( Use  )

Definition at line 507 of file memlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( TotalWs  )

Definition at line 515 of file memlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( PrivateWs  )

Definition at line 521 of file memlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( ShareableWs  )

Definition at line 527 of file memlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( SharedWs  )

Definition at line 533 of file memlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( LockedWs  )

Definition at line 539 of file memlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( Committed  )

Definition at line 545 of file memlist.c.

END_SORT_FUNCTION BEGIN_SORT_FUNCTION ( Private  )

Definition at line 551 of file memlist.c.

VOID PhDeleteMemoryList ( _In_ PPH_MEMORY_LIST_CONTEXT  Context)

Definition at line 112 of file memlist.c.

VOID PhDeselectAllMemoryNodes ( _In_ PPH_MEMORY_LIST_CONTEXT  Context)

Definition at line 902 of file memlist.c.

PPH_MEMORY_NODE PhGetSelectedMemoryNode ( _In_ PPH_MEMORY_LIST_CONTEXT  Context)

Definition at line 838 of file memlist.c.

VOID PhGetSelectedMemoryNodes ( _In_ PPH_MEMORY_LIST_CONTEXT  Context,
_Out_ PPH_MEMORY_NODE **  MemoryNodes,
_Out_ PULONG  NumberOfMemoryNodes 
)

Definition at line 866 of file memlist.c.

VOID PhInitializeMemoryList ( _In_ HWND  ParentWindowHandle,
_In_ HWND  TreeNewHandle,
_Out_ PPH_MEMORY_LIST_CONTEXT  Context 
)

Definition at line 52 of file memlist.c.

VOID PhLoadSettingsMemoryList ( _Inout_ PPH_MEMORY_LIST_CONTEXT  Context)

Definition at line 123 of file memlist.c.

PPH_MEMORY_NODE PhpAddAllocationBaseNode ( _Inout_ PPH_MEMORY_LIST_CONTEXT  Context,
_In_ PVOID  AllocationBase 
)

Definition at line 221 of file memlist.c.

PPH_MEMORY_NODE PhpAddRegionNode ( _Inout_ PPH_MEMORY_LIST_CONTEXT  Context,
_In_ PPH_MEMORY_ITEM  MemoryItem 
)

Definition at line 254 of file memlist.c.

VOID PhpClearMemoryList ( _Inout_ PPH_MEMORY_LIST_CONTEXT  Context)

Definition at line 97 of file memlist.c.

VOID PhpCopyMemoryRegionTypeInfo ( _In_ PPH_MEMORY_ITEM  Source,
_Inout_ PPH_MEMORY_ITEM  Destination 
)

Definition at line 280 of file memlist.c.

VOID PhpDestroyMemoryNode ( _In_ PPH_MEMORY_NODE  MemoryNode)

Definition at line 199 of file memlist.c.

PPH_STRING PhpFormatSizeIfNonZero ( _In_ ULONG64  Size)

Definition at line 436 of file memlist.c.

PPH_STRING PhpGetMemoryRegionUseText ( _In_ PPH_MEMORY_ITEM  MemoryItem)

Definition at line 384 of file memlist.c.

END_SORT_FUNCTION BOOLEAN NTAPI PhpMemoryTreeNewCallback ( _In_ HWND  hwnd,
_In_ PH_TREENEW_MESSAGE  Message,
_In_opt_ PVOID  Parameter1,
_In_opt_ PVOID  Parameter2,
_In_opt_ PVOID  Context 
)

Definition at line 557 of file memlist.c.

LONG PhpMemoryTreeNewPostSortFunction ( _In_ LONG  Result,
_In_ PVOID  Node1,
_In_ PVOID  Node2,
_In_ PH_SORT_ORDER  SortOrder 
)

Definition at line 467 of file memlist.c.

VOID PhpUpdateMemoryNodeUseText ( _Inout_ PPH_MEMORY_NODE  MemoryNode)

Definition at line 428 of file memlist.c.

VOID PhReplaceMemoryList ( _Inout_ PPH_MEMORY_LIST_CONTEXT  Context,
_In_opt_ PPH_MEMORY_ITEM_LIST  List 
)

Definition at line 299 of file memlist.c.

VOID PhSaveSettingsMemoryList ( _Inout_ PPH_MEMORY_LIST_CONTEXT  Context)

Definition at line 137 of file memlist.c.

VOID PhSetOptionsMemoryList ( _Inout_ PPH_MEMORY_LIST_CONTEXT  Context,
_In_ BOOLEAN  HideFreeRegions 
)

Definition at line 151 of file memlist.c.

VOID PhUpdateMemoryNode ( _In_ PPH_MEMORY_LIST_CONTEXT  Context,
_In_ PPH_MEMORY_NODE  MemoryNode 
)

Definition at line 374 of file memlist.c.