A new allocation attribute of OBJ_ANY is available to 32-bit programs when allocating memory using DosAllocMem and DosAllocSharedMem. OBJ_ANY indicates that the memory may be allocated anywhere in the available virtual address space. An application must be able to handle pointer values above the 512 MB tiled memory compatibility region when using OBJ_ANY.
In OS/2 Warp Server for SMP, OBJ_ANY memory allocations will first be attempted in the high memory area, which is the area of the virtual address space above 512 MB. If there is insufficient memory to satisfy the request from the high memory area, the memory will be allocated in the first 512 MB of the address space. IBM reserves the right to change this allocation strategy in future releases of OS/2.
Memory objects allocated below the 512 MB line will start on a 64 KB boundary, the size will be rounded up to a multiple of 64 KB, and the memory will be tileable.
Objects allocated above the 512 MB line will start on a 4 KB boundary, the size will be rounded up to a multiple of 4 KB, and the memory will not be tileable. 16-bit programs will not be able to address or access the object.
Memory should be allocated with the OBJ_ANY attribute wherever possible, since it provides the most efficient use of both the per-process address space as well as the system-wide virtual memory resources. It is intended that an application would make infrequent requests for large blocks of memory using DosAllocMem and then use DosSubSetMem along with DosSubAllocMem and DosSubFreeMem to manage the memory. If OBJ_ANY is not specified, the behavior of DosAllocMem and DosAllocSharedMem is the same as in OS/2 Warp.