uLib  User mode C/C++ extended API library for Win32 programmers.
MemFunc.cpp File Reference
#include <uLib\MemFunc.h>
#include <uLib\UtilFunc.h>
#include <uLib\Debug.h>
#include <uLib/_Internal.h>
#include <uLib/StrFunc.h>

Go to the source code of this file.

Macros

#define ERROR_INVALID_CRUNTIME_PARAMETER   1288L
 
#define _IF_ERR(cond, fmt, ...)
 

Functions

void * mem_Alloc (size_t Bytes)
 
void * mem_Realloc (void *pBlk, size_t Bytes)
 
void * mem_Free (void *pBlk)
 
bool mem_Compact ()
 
PVOID AllocMemoryPages (WORD nPages, DWORD Access)
 
PVOID FreeMemoryPages (PVOID pBlk)
 
DWORD GetMemoryPageSize ()
 
UINT GetPageRegionSize (PVOID pBlk)
 
PVOID GetPageBaseAddress (PVOID pBlk)
 
PVOID GetPageAllocationBase (PVOID pBlk)
 
PVOID PhysicalPtr (HPHYSICAL hMem)
 
UINT64 PhysicalSize (HPHYSICAL hMem)
 
ULONG_PTR PhysicalPageCount (HPHYSICAL hMem)
 
HPHYSICAL PhysicalAlloc (UINT64 nBytes)
 
HPHYSICAL PhysicalFree (HPHYSICAL hMem)
 

Variables

HANDLE app_Heap = GetProcessHeap()
 

Macro Definition Documentation

◆ ERROR_INVALID_CRUNTIME_PARAMETER

#define ERROR_INVALID_CRUNTIME_PARAMETER   1288L

Definition at line 29 of file MemFunc.cpp.

◆ _IF_ERR

#define _IF_ERR (   cond,
  fmt,
  ... 
)
Value:
if (cond) { \
DPrint( DP_ERROR, fmt, __VA_ARGS__ ); \
if (IsDebuggerPresent()) __debugbreak(); \
else MessageBox( HWND_DESKTOP, \
_T("MemFunc Breakpoint:\nNo debugger present.. You may want to attach one now."), \
dbg_Name, MB_OK| MB_ICONSTOP ); \
}
CSTR dbg_Name
Definition: Debug.cpp:114
#define DP_ERROR
Definition: Debug.h:82

Definition at line 317 of file MemFunc.cpp.