System.HeapAllocFlags

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

HeapAllocFlags: Word platform = 2;   { Heap allocation flags, gmem_Moveable }

C++

extern DELPHI_PACKAGE Word HeapAllocFlags;

Properties

Type Visibility Source Unit Parent
variable public
System.pas
System.hpp
System System

Description

Indicates how the memory manager obtains memory from the operating system.

On Windows, use HeapAllocFlags to customize the flags that the system memory manager uses when requesting blocks of memory from the operating system. By default, the value is GMEM_MOVEABLE.

HeapAllocFlags can be a combination of the following values:



GMEM_FIXED

Allocates fixed memory. The operating system cannot move blocks, so there is no need to lock memory when obtaining a pointer (cannot be combined with GMEM_MOVEABLE.)

GMEM_MOVEABLE

Allocates movable memory. In Win32, memory blocks are never moved in physical memory, but they can be moved within the default heap.

GMEM_ZEROINIT

Initializes memory contents to zero.

GMEM_MODIFY

Used to modify the attributes of an already-allocated block of memory.

GMEM_DDESHARE GMEM_SHARE

This flag is primarily for compatibility with 16-bit Window, but can be used to enhance the performance of DDE operations. It should only be specified if the memory is to be used for DDE.

GPTR

Combines the GMEM_FIXED and GMEM_ZEROINIT flags.

GHND

Combines the GMEM_MOVEABLE and GMEM_ZEROINIT flags.



See Also