FRANTISEK FRANEK ~ McMaster University
PUBLISHED BY THE PRESS SYNDICATE OF THE UNIVERSITY OF CAMBRIDGE
The Pitt Building, Trumpington Street, Cambridge, United Kingdom
CAMBRIDGE UNIVERSITY PRESS
The Edinburgh Building, Cambridge CB2 2RU, UK
40 West 20th Street, New York, NY 10011-4211, USA
477 Williamstown Road, Port Melbourne, VIC 3207, Australia
Ruiz de Alarc ³n 13, 28014 Madrid, Spain
Dock House, The Waterfront, Cape Town 8001, South Africa
http://www.cambridge.org
Copyright Frantisek Franek 2004
This book is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press.
First published 2004
Printed in the United States of America
Typefaces Utopia 9.5/13.5 pt. and ITC Kabel System [FH]
A catalog record for this book is available from the British Library.
Library of Congress Cataloging in Publication data
Franek, F. (Frantisek) Memory as a programming concept in C and C++ / Frantisek Franek. p. cm. Includes bibliographical references and index.
ISBN 0-521-52043-6 (pb.)
QA76.9.M45F73 2003
005.4'35 - dc21 2003051543
ISBN 0 521 81720 X hardback
ISBN 0 521 52043 6 paperback
To my parents Prof. Dr. Ji and Zdeˆka Fran•k for everything; and my mentors and best friends Dr. B. Balcar DrSc., Czech Academy of Sciences, Prof. Emeritus Dr. A. Rosa, McMaster University, Honorable V. L. Rosicky, Consul of the Czech Republic, formerly president of Terren Corp. for everything I know about computers and mathematics; and my wife Marie and children Jacob and Nicole, for their love, support, and understanding
Acknowledgments
Every book is to a significant degree a team effort; there are always many people essential for the book's publication, from the author(s) all the way to the editors and publisher. This book is no exception, and my sincere gratitude goes to all the people who contributed to its publication. My special thanks go to George Grosman, a musician and man of letters , for his help with the style and the grammar (English is not my mother tongue), and to Dr. Jan Holub, a postdoctoral Fellow in the Department of Computing and Software at McMaster University, for his careful reading of the manuscript and checking of the technical aspects of the text.
Please note that lengthier sections of code - as well as solutions to selected exercises - can be found on my website: www.cas.mcmaster.ca/ ~ franek .