Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
LINUX系統程式設計 第二版
by
Robert Love
December 2013
Intermediate to advanced
496 pages
8h 57m
Chinese
GoTop Information, Inc.
Content preview from
LINUX系統程式設計 第二版
352
|
第九章
EAGAIN
核心的可用資源不足以完成此要求。
EFAULT
參數
vec
指向了一個無效的位址。
EINVAL
參數
start
並未對齊一個頁面的邊界。
ENOMEM
[address,address+1)
所包含的記憶體並非「基於檔案之映射」(
file-based mapping
)
的一部分。
目前,此系統呼叫僅適用於以
MAP_SHARED
所建立之基於檔案的映射。這是使用此呼叫時
最大的限制。
投機取巧的分配策略
Linux
採用了
投機取巧的分配
(
opportunistic allocation
)策略。當一個行程向核心要求
額外的記憶體時—例如,透過擴大它的資料區段,或者透過建立一個新的記憶體映射—
核心會對額外的記憶體做出承諾,但是不會實際提供任何實體的儲存空間。只有在行程
寫入剛才所分配的記憶體,核心才會透過把所承諾的記憶體轉換成實體的記憶體分配
來兌現它的承諾。核心會按照需要,以逐頁面的方式進行需求分頁以及寫入時才複製的
操作。
此行為具有若干優點。首先,延遲分配記憶體的做法,讓核心得以延後大部分的工作,
直到最後一刻—必須滿足所承諾的記憶體時。其次,因為核心會以逐頁面的方式進行需
求分頁來滿足此類要求,所以只有實際在使用的實體記憶體,才需要耗用實體的儲存空
間。最後,所承諾的記憶體數量可遠超過實體記憶體的數量以及可利用的置換空間。此
特性稱為
過度承諾
(
overcommitment
)。
過度承諾與記憶體不足
如果每個所要求的記憶體頁面在分配的時候(而非使用的時候)必須保存在實體儲存空
間,則過度承諾讓系統得以運行比原本更多且更大的應用程式 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial
You might also like
優雅的SciPy|Python科學研究的美學
Juan Nunez-Iglesias, Stéfan van der Walt, Harriet Dashnow
成為卓越程式設計師的38項必修法則
Pete Goodliffe
深入理解運算原理|從簡單的機器到無所不能的程式
Tom Stuart
C++语言导学(原书第2版)
本贾尼 斯特劳斯特鲁普
Publisher Resources
ISBN: 9789862769812