totalMemory method

Description

Returns the total reserved size of the Explicit memory block.

Format

public long totalMemory();

Parameters

None

Exceptions

InaccessibleMemoryAreaException:
This functionality is not supported.

Return value

The common error check is performed, and then this method returns either of the following values:

0:
Returned when the API processing cannot be performed.
Total reserved memory size (number of bytes) of the Explicit memory block indicated by the object:
When the API processing can be performed, the memory size that can be used by the Explicit memory block indicated by the object is returned to the long type.

For details on common error check, see 10.6 Error check (common error check) of the process that controls the Explicit memory block .