Abstract
This chapter describes the implementation details of the QSP persistence. It starts with a single page from which all the objects are allocated. When more space is needed, additional pages are automatically allocated. When storing data to disk, all data are collapsed into a single page, and the unused objects are eliminated. During each program run a temporary management of free objects is used.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
These counts exclude blank lines and comments.
- 2.
This requirement is specific for Objective-C; it would not be required in the C++ implementation.
- 3.
This should be avoided because ARC does not work with struct that hides a pointer.
- 4.
This is an addition to the standard Objective-C, which has no mechanism for this. The established way of doing this is to use class NSArray.
- 5.
The line with prtList may be eventually removed, assuming the automatic pointer detection proves reliable and covering all possible situations.
- 6.
For another interesting example, see bk\chap6\testinit.m.
- 7.
One million books, without abstracts, five runs for each coding style.
- 8.
This is our allocation scheme, not a part of standard Objective-C.
- 9.
As QSP does.
- 10.
For a running example see directory bk\chap6\autoPtrs
- 11.
With this arrangement, ptrList may provide only some pointers, or no pointers if no struct is used.
- 12.
See Sect. 6.1.
- 13.
At the moment we believe that pointers embedded in a struct are the only situation not covered.
- 14.
It does not matter where the call is, it only matters what it allocates.
- 15.
- 16.
- 17.
For a running example, see directory bk/chap6/possible
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2014 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Soukup, J., Lokanath, R., Soukup, M. (2014). Automatic Persistence for Objective-C. In: Serialization and Persistent Objects. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39323-5_6
Download citation
DOI: https://doi.org/10.1007/978-3-642-39323-5_6
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-39322-8
Online ISBN: 978-3-642-39323-5
eBook Packages: Computer ScienceComputer Science (R0)