ReactOS 0.4.15-dev-5664-g3bf4ef6
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 {
74 return ::GlobalAlloc(GMEM_FIXED, size);
75 }
GLsizeiptr size
Definition: glext.h:5919
#define GMEM_FIXED
Definition: winbase.h:293

◆ Free()

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

Definition at line 89 of file atlalloc.h.

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

◆ 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 }
86 return ::GlobalReAlloc(ptr, size, 0);
87 }
#define NULL
Definition: types.h:112
_In_opt_ PALLOCATE_FUNCTION Allocate
Definition: exfuncs.h:814
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815

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