> For the complete documentation index, see [llms.txt](https://richardweiyang-2.gitbook.io/understanding_qemu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://richardweiyang-2.gitbook.io/understanding_qemu/00-memory_backend.md).

# MemoryBackend

MemoryBackend是虚拟内存的后端，和前段设备pc-dimm一起组成完整的虚拟内存。

比如我们在做内存热插拔时的命令行：

```
object_add memory-backend-ram,id=ram0,size=1G
device_add pc-dimm,id=dimm0,memdev=ram0,node=0
```

其中第一行创建的就是MemoryBackend。

本章主要讲述MemoryBackend设备的

[类层次结构](/understanding_qemu/00-memory_backend/01-class_hierarchy.md) [初始化流程](https://github.com/RichardWeiYang/understanding_qemu/tree/448dc3778e2f8b5a32dda5bf32a52325f8807c41/memory_backend/memory_backend/02-init_flow.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://richardweiyang-2.gitbook.io/understanding_qemu/00-memory_backend.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
