ESMQuery

Returns information about how much memory is in the system.

Library:LibC
Classification:NetWare OS
Service:NetWare Platform

Syntax

  #include <esm.h> 
   
  int ESMQuery (
     size_t            bufferSize,
     ESMQueryInfo_t   *buffer);
  

Parameters

bufferSize

(IN) Specifies, in bytes, the size of the query information to be returned.

buffer

(OUT) Points to the buffer where memory information is returned in an ESMQueryInfo_t structure.

Return Values

If successful, returns 0. Otherwise, returns a nonzero error code.

Decimal

Name

Description

10

ERR_BUFFER_SIZE

The specified buffer is too small.

For other possible values, see Section 30.3, Return Values for ESM Functions.

Remarks

The ESMQuery function returns information about total extended server memory, remaining extended server memory, and total memory below 4 GB. This function can be used to determine the size for an ESMAlloc call; however, there is no guarantee that memory available at the time of the query will still be available at the time of allocation.

See Also