Constant solana_runtime::account_info::CACHED_OFFSET
source · const CACHED_OFFSET: OffsetReduced = _; // 2_147_483_647u32
Expand description
This is an illegal value for ‘offset’. Account size on disk would have to be pointing to the very last 8 byte value in the max sized append vec. That would mean there was a maximum size of 8 bytes for the last entry in the append vec. A pubkey alone is 32 bytes, so there is no way for a valid offset to be this high of a value. Realistically, a max offset is (1<<31 - 156) bytes or so for an account with zero data length. Of course, this depends on the layout on disk, compression, etc. But, 8 bytes per account will never be possible. So, we use this last value as a sentinel to say that the account info refers to an entry in the write cache.