GET_GSTORAGE@

Platform

Win32

Purpose

To get a block of memory of size N bytes from the global memory heap.

Syntax

SUBROUTINE GET_GSTORAGE@(ADDR,N)
INTEGER (KIND=7) ADDR
INTEGER N

Description

ADDR is returned as the address of the first byte of the block. A returned value of -1 indicates that there is insufficient contiguous memory to create the block.

GET_GSTORAGE@ is provided for situations where a large block of memory is required in a Win32 application for a long period of time after which it is assumed that it will be released (using RETURN_GSTORAGE@) with no intention of using it again. In situations where the amount of memory required is small (<32K) GET_STORAGE@ provides better performance. GET_GSTORAGE@ requests memory directly from the operating system rather than using the heaps managed by salflibc

GET_GSTORAGE@ is not available for .NET where GET_STORAGE@ must be used.

Notes

Memory allocated using GET_GSTORAGE@ should be returned using RETURN_GSTORAGE@.

See also

RETURN_GSTORAGE@, GET_STORAGE@

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited