SSAllocMem: Difference between revisions
Appearance
Created page with "SSAllocMem allocates a shared memory object that is managed by the selector server component of the graphics engine. == Syntax == SSAllocMem(pBaseAddress, ObjectSize, Flag..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
SSAllocMem allocates a shared memory object that is managed by the selector server component of the graphics engine. | SSAllocMem allocates a shared memory object that is managed by the selector server component of the graphics engine. | ||
== Syntax == | == Syntax == | ||
SSAllocMem(pBaseAddress, ObjectSize, Flags) | SSAllocMem(pBaseAddress, ObjectSize, Flags) | ||
== Parameters == | == Parameters == | ||
;pBaseAddress (PVOID) - input | ;pBaseAddress (PVOID) - input:Pointer to a variable, which will receive the base address of the allocated memory. | ||
:Pointer to a variable, which will receive the base address of the allocated memory. | ;ObjectSize (ULONG) - input:Value that specifies the size in bytes of the shared memory to allocate. The size is rounded up to the next page boundary. | ||
;Flags (ULONG) - input:Reserved. | |||
;ObjectSize (ULONG) - input | :Reserved. Must be 0. | ||
:Value that specifies the size in bytes of the shared memory to allocate. The size is rounded up to the next page boundary. | |||
;Flags (ULONG) - input | |||
:Reserved. | |||
:Reserved. Must be 0. | |||
== Returns == | == Returns == | ||
;rc (ULONG) - returns | ;rc (ULONG) - returns:Return codes. | ||
:Return codes. | :SSAllocMem returns a ULONG value: | ||
::NO_ERROR | |||
:SSAllocMem returns a ULONG value: | ::ERROR_INVALID_PARAMETER | ||
::NO_ERROR | ::ERROR_NOT_ENOUGH_MEMORY. | ||
::ERROR_INVALID_PARAMETER | :;Note::Other return codes listed under DosAllocSharedMem might also apply. | ||
::ERROR_NOT_ENOUGH_MEMORY. | |||
:;Note::Other return codes listed under DosAllocSharedMem might also apply. | |||
== Remarks == | == Remarks == | ||
Presentation drivers should use SSAllocMem to allocate memory for objects, such as bit maps and regions, to ensure that the returned memory object is a global memory object for which the system can set a new owner, or which can be marked as having no owner. | Presentation drivers should use SSAllocMem to allocate memory for objects, such as bit maps and regions, to ensure that the returned memory object is a global memory object for which the system can set a new owner, or which can be marked as having no owner. | ||
In some presentation devices, the handling routine for FillLogicalDeviceBlock (OS2_PM_DRV_ENABLE, sub-function 2) allocates global heap space for use by the device contexts. The memory for this heap space is obtained by calling the SSAllocMem function. | In some presentation devices, the handling routine for [[FillLogicalDeviceBlock]] (OS2_PM_DRV_ENABLE, sub-function 2) allocates global heap space for use by the device contexts. The memory for this heap space is obtained by calling the SSAllocMem function. | ||
[[Category: | [[Category:Gre]] |
Latest revision as of 08:15, 5 March 2020
SSAllocMem allocates a shared memory object that is managed by the selector server component of the graphics engine.
Syntax
SSAllocMem(pBaseAddress, ObjectSize, Flags)
Parameters
- pBaseAddress (PVOID) - input
- Pointer to a variable, which will receive the base address of the allocated memory.
- ObjectSize (ULONG) - input
- Value that specifies the size in bytes of the shared memory to allocate. The size is rounded up to the next page boundary.
- Flags (ULONG) - input
- Reserved.
- Reserved. Must be 0.
Returns
- rc (ULONG) - returns
- Return codes.
- SSAllocMem returns a ULONG value:
- NO_ERROR
- ERROR_INVALID_PARAMETER
- ERROR_NOT_ENOUGH_MEMORY.
- Note
- :Other return codes listed under DosAllocSharedMem might also apply.
Remarks
Presentation drivers should use SSAllocMem to allocate memory for objects, such as bit maps and regions, to ensure that the returned memory object is a global memory object for which the system can set a new owner, or which can be marked as having no owner.
In some presentation devices, the handling routine for FillLogicalDeviceBlock (OS2_PM_DRV_ENABLE, sub-function 2) allocates global heap space for use by the device contexts. The memory for this heap space is obtained by calling the SSAllocMem function.