---
title: "DeviceMemory"
sidebar_label: "DeviceMemory"
description: "Kotlin binding reference: DeviceMemory."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.modelverse](../index.md)/[DeviceMemory](index.md)

# DeviceMemory

[common]\
data class [DeviceMemory](index.md)(val device: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val totalBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val freeBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val runtimeBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), val activeBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html))

A device's memory as the runtime reads it ([Modelverse.deviceMemory](../Modelverse/deviceMemory.md)): the physical total, what is free, the runtime's own share and the pool bytes in use.

## Constructors

| | |
|---|---|
| [DeviceMemory](DeviceMemory.md) | [common]<br>constructor(device: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), totalBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), freeBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), runtimeBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), activeBytes: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)) |

## Properties

| Name | Summary |
|---|---|
| [activeBytes](activeBytes.md) | [common]<br>val [activeBytes](activeBytes.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [device](device.md) | [common]<br>val [device](device.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)<br>The device as the library labels it, `<Api>:<index>` (`CPU:-1` for the whole machine's cpu, `CUDA:0`). |
| [freeBytes](freeBytes.md) | [common]<br>val [freeBytes](freeBytes.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [runtimeBytes](runtimeBytes.md) | [common]<br>val [runtimeBytes](runtimeBytes.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |
| [totalBytes](totalBytes.md) | [common]<br>val [totalBytes](totalBytes.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) |