ReactOS 0.4.15-dev-8100-g1887773
CLocalAllocator 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 43 of file atlalloc.h.

Member Function Documentation

◆ Allocate()

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

Definition at line 46 of file atlalloc.h.

47 {
48 return ::LocalAlloc(LMEM_FIXED, size);
49 }
GLsizeiptr size
Definition: glext.h:5919
#define LMEM_FIXED
Definition: winbase.h:368

◆ Free()

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

Definition at line 63 of file atlalloc.h.

64 {
66 }
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
static PVOID ptr
Definition: dispmode.c:27

◆ Reallocate()

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

Definition at line 51 of file atlalloc.h.

52 {
53 if (!ptr)
54 return Allocate(size);
55 if (size == 0)
56 {
57 Free(ptr);
58 return NULL;
59 }
60 return ::LocalReAlloc(ptr, size, 0);
61 }
#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: