KCMS CMM Developer's Guide

Private

Private saving uses the chunk set and chunk Id associated with the instance to save. The derivative only needs to package all of its data into a contiguous piece of memory and pass the address and its chunk Id to the object's chunk set. If this is too limiting, you can split the derivative's pieces into different chunks, each with its own chunk Id. The only caveat is that the instance must then place all of those chunk Ids into one chunk, which is ultimately saved as the top of the object.

This approach is appropriate when the object has many data structures that it does not want to store into one contiguous memory block. It also helps with loading if all the pieces are not needed all the time. This is the overall approach taken by the KCMS framework where the KcsProfile class has a table of chunkIds, one of which is the attribute chunkId for this profile. When loading attributes only, it is faster to use getchunk()() and load just the attribute object than it is to use getchunk()() and load the entire set of objects that represent a profile.