文档介绍:Get Smart! at :
*More than 150,000 articles for
DUMMIES
*Learn how almost everything
works
*Get Smart! Get Pedia!
Memory Management
Algorithms and
Implementation in C/C++
by
Bill Blunden
Wordware Publishing, Inc.
Library of Congress Cataloging-in-Publication Data
Blunden, Bill, 1969-
Memory management: algorithms and implementation in C/C++ / by
Bill Blunden.
p. cm.
Includes bibliographical references and index.
ISBN 1-55622-347-1
1. Memory management (Computer science) 2. Computer algorithms.
3. C (Computer program language) 4. C++ (Computer program
language) I. Title.
.B558 2002
'35--dc21 2002012447
CIP
© 2003, Wordware Publishing, Inc.
All Rights Reserved
2320 Los Rios Boulevard
Plano, Texas 75074
No part of this book may be reproduced in any form or by
any means without permission in writing from
Wordware Publishing, Inc.
Printed in the United States of America
ISBN 1-55622-347-1
**********
0208
Product names mentioned are used for identification purposes only and may be trademarks of
their panies.
All inquiries for volume purchases of this book should be addressed to Wordware
Publishing, Inc., at the above address. Telephone inquiries may be made by calling:
(972) 423-0090
This book is dedicated to Rob, Julie, and Theo.
And also to David M. Lee
“I came to learn physics, and I got Jimmy Stewart”
iii
Table of Contents
Acknowledgments......................xi
Introduction.........................xiii
Chapter 1 Memory Management Mechanisms. . . . . . . . . 1
MechanismVersusPolicy..................1
MemoryHierarchy......................3
AddressLinesandBuses...................9
Intel Pentium Architecture . . . . . . . . . . . . . . . . . 11
RealModeOperation...................14
Protected Mode Operation. . . . . . . . . . . . . . . . 18
Protected Mode Segmentation . . . . . . . . . . . . 19
ProtectedModePaging................26
PagingasProtection...