> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/man/man9/pmap_object_init_pt.9.md).

# pmap\_object\_init\_pt.9

`pmap_object_init_pt` — 为 VM 对象初始化页表

## 名称

`pmap_object_init_pt`

## 概要

`#include <sys/param.h>`

`#include <vm/vm.h>`

`#include <vm/pmap.h>`

`Ft void Fo pmap_object_init_pt pmap_t pmap vm_offset_t addr vm_object_t object vm_pindex_t pindex vm_size_t size int limit Fc`

## 描述

`pmap_object_init_pt` 函数将页表项预加载到指定的物理映射 `pmap` 中，用于给定 `object` 在虚拟地址 `addr` 处、`size` 字节范围内，从对象内的页索引 `pindex` 开始。创建映射时会注意映射位 `limit`。

## 实现说明

此函数并非架构的 [pmap(9)](/man/man9/pmap.9.md) 实现严格要求的，但如果实现，它确实提供了性能优势。

它旨在消除进程启动时以及调用 mmap(2) 之后立即产生的软故障风暴。

## 参见

[pmap(9)](/man/man9/pmap.9.md), [vm\_map(9)](/man/man9/vm_map.9.md)

## 作者

本手册页由 Bruce M Simpson <bms@spc.org> 编写。


---

# 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, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/man/man9/pmap_object_init_pt.9.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
