Since the offset/index information into the actual data will usually be identical we can share that information with all handles that have the exact same offsets.
More...
Since the offset/index information into the actual data will usually be identical we can share that information with all handles that have the exact same offsets.
You would typically only have a large number of different table of contents if you had a several variable sized attributes.
Two AVL trees are used to track the attribute layout numbers. one is keyed by number and will be consulted when a DMU_OT_SA object is first read. The second tree is keyed by the hash signature of the attributes and will be consulted when an attribute is added to determine if we already have an instance of that layout. Both of these tree's are interconnected. The only difference is that when an entry is found in the "hash" tree the list of attributes will need to be compared against the list of attributes you have in hand. The assumption is that typically attributes will just be updated and adding a completely new attribute is a very rare operation.
Definition at line 137 of file sa_impl.h.