2.1.1 Global and Local Functions

A process can allocate memory using the Global and Local functions, or using the functions of the standard C library. Memory allocated by any of these functions is in private, committed pages with read/write access. Private means that the memory cannot be accessed by other processes. The GMEM_DDESHARE flag with GlobalAlloc is ignored. Applications that need shared memory for DDE must use the DDE functions which have their own internal mechanisms for creating DDE shared memory objects. Applications that require shared memory for other purposes must use file mapping to provide named shared memory as described below.

The Global and Local functions allow you to allocate a block of memory of any size (limited only by the available physical memory including backing store). However, the change from a 16-bit segmented memory model to the 32-bit virtual memory model has made some of the functions and their options unnecessary or meaningless. For instance, there are no longer near and far pointers, since both local and global allocations return 32-bit virtual addresses.