Page 96 - DCAP408_WEB_PROGRAMMING
P. 96
Windows Programming
Notes The function call for GlobalLock remains as in portable memory blocks.
A discardable resource can be substituted by reloading the resource form the resource segment
of the module. This occurs transparently. Specifically, if you call a resource loading function and
the obtainable copy of the resource has been discarded, a new copy will be loaded.
Self Assessment
Fill in the blanks:
14. Windows can reallocate a .................... memory block to a 0 length when it requires space
to gratify another allotment request.
15. A discardable resource can be substituted by .................... the resource form the resource
segment of the module.
5.7 Summary
Global memory exists in device memory and device memory is used through 32-, 64-, or
128-byte memory transactions.
Global memory instructions assist reading or writing words of size equal to 1, 2, 4, 8, or 16
bytes.
Local memory accesses only happen for some automatic variables.
On devices of compute capability 2.0, local memory accesses are at all times cached in L1
and L2 in the similar manner as global memory accesses
Fixed size memory blocks allocation algorithm has been established to permit technique
of memory allocation in static time, separately to number of allocated blocks.
All of the allocated blocks have a fixed size, defined throughout memory initialization.
The ST_USE_FIXMEM constant comprises information whether functions for fixed size
memory blocks allocation are incorporated or expelled from compilation.
The realloc function modifies the size of the block whose address is ptr to be newsize.
The LocalReAlloc function modifies the size or the attributes of a stated local memory
object.
Windows can reallocate a discardable memory block to a 0 length when it requires space
to gratify another allotment request.
5.8 Keywords
Discardable memory block: Windows can reallocate a discardable memory block to a 0 length
when it requires space to gratify another allotment request.
LocalReAlloc: The LocalReAlloc function modifies the size or the attributes of a stated local
memory object.
realloc: The realloc function modifies the size of the block whose address is ptr to be newsize.
ST_USE_FIXMEM: The ST_USE_FIXMEM constant comprises information whether functions
for fixed size memory blocks allocation are incorporated or expelled from compilation.
90 LOVELY PROFESSIONAL UNIVERSITY