ReactOS  0.4.15-dev-3165-gdf6fff7
CGlobalAllocator Class Reference

#include <atlalloc.h>

Static Public Member Functions

static voidAllocate (_In_ size_t size)
 
static voidReallocate (_In_opt_ void *ptr, _In_ size_t size)
 
static void Free (_In_opt_ void *ptr)
 

Detailed Description

Definition at line 69 of file atlalloc.h.

Member Function Documentation

◆ Allocate()

static void* CGlobalAllocator::Allocate ( _In_ size_t  size)
inlinestatic

Definition at line 72 of file atlalloc.h.

73  {
75  }
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
GLsizeiptr size
Definition: glext.h:5919
#define GMEM_FIXED
Definition: winbase.h:290

Referenced by Reallocate().

◆ Free()

static void CGlobalAllocator::Free ( _In_opt_ void ptr)
inlinestatic

Definition at line 89 of file atlalloc.h.

90  {
91  GlobalFree(ptr);
92  }
static PVOID ptr
Definition: dispmode.c:27
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611

Referenced by Reallocate().

◆ Reallocate()

static void* CGlobalAllocator::Reallocate ( _In_opt_ void ptr,
_In_ size_t  size 
)
inlinestatic

Definition at line 77 of file atlalloc.h.

78  {
79  if (!ptr)
80  return Allocate(size);
81  if (size == 0)
82  {
83  Free(ptr);
84  return NULL;
85  }
87  }
HGLOBAL NTAPI GlobalReAlloc(HGLOBAL hMem, SIZE_T dwBytes, UINT uFlags)
Definition: heapmem.c:825
static PVOID ptr
Definition: dispmode.c:27
GLsizeiptr size
Definition: glext.h:5919
static void * Allocate(_In_ size_t size)
Definition: atlalloc.h:72
#define NULL
Definition: types.h:112
static void Free(_In_opt_ void *ptr)
Definition: atlalloc.h:89

The documentation for this class was generated from the following file: