RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.HeapAllocFlags Variable

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

Pascal
HeapAllocFlags: Word platform = 2;
C++
Word platform HeapAllocFlags = 2;

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 can't move blocks, so there is no need to lock memory when obtaining a pointer. (can't 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.  

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!