Structs

struct MemoryInfo (deprecated)

public struct MemoryInfo

Description: Provides APIs for obtaining heap memory statistics.

NOTE

This structure will be deprecated in future releases and the global functions getAllocatedHeapSize, getUsedHeapSize, and getMaxHeapSize will be used to replace related static properties.

static prop allocatedHeapSize

public static prop allocatedHeapSize: Int64

Description: Obtains the occupied size of the Cangjie heap, measured in bytes.

Type: Int64

static prop heapPhysicalMemory

public static prop heapPhysicalMemory: Int64

Description: Obtains the size of the physical memory occupied by the Cangjie heap on the Linux platform, measured in bytes. Obtains the size of the physical memory occupied by the Cangjie process on the Windows and macOS platforms, measured in bytes.

Type: Int64

static prop maxHeapSize

public static prop maxHeapSize: Int64

Description: Obtains the maximum usable size of the Cangjie heap, measured in bytes.

Examples:

import std.runtime.*
main() {
  println(MemoryInfo.maxHeapSize)
}

Results (subject to the actual environment):

268435456

Type: Int64

struct ProcessorInfo (deprecated)

public struct ProcessorInfo

Description: Provides APIs for obtaining processor information.

NOTE

This structure will be deprecated in future releases and getProcessorCount will be used to replace related static properties.

static prop processorCount

public static prop processorCount: Int64

Description: Obtains the number of processors.

Type: Int64

struct ThreadInfo (deprecated)

public struct ThreadInfo

Description: Provides APIs for obtaining Cangjie thread statistics.

NOTE

This structure will be deprecated in future releases and getBlockingThreadCount, getNativeThreadCount and getThreadCount will be used to replace related static properties.

static prop blockingThreadCount

public static prop blockingThreadCount: Int64

Description: Obtains the number of blocked Cangjie threads.

Type: Int64

static prop nativeThreadCount

public static prop nativeThreadCount: Int64

Description: Obtains the number of physical threads.

Type: Int64

static prop threadCount

public static prop threadCount: Int64

Description: Obtains the number of current Cangjie threads.

Type: Int64