Lines Matching refs:address
16 // Implementation of the Address Cache and Address Encoding
105 // This method will be called whenever an address is calculated for an
114 // address: This must be a valid address between 0 and
118 void VCDiffAddressCache::UpdateCache(VCDAddress address) {
120 near_addresses_[next_slot_] = address;
124 same_addresses_[address % (same_cache_size_ * 256)] = address;
128 // Determines the address mode that yields the most compact encoding
129 // of the given address value, writes the encoded address into the
130 // address stream, and returns the mode used. The most compact encoding
131 // is found by looking for the numerically lowest encoded address.
135 // address: The address to be encoded. Must be a non-negative integer
140 // with the encoded representation of address.
147 // how to interpret the next value in the address stream.
154 unsigned char VCDiffAddressCache::EncodeAddress(VCDAddress address,
157 if (address < 0) {
158 LOG(DFATAL) << "EncodeAddress was passed a negative address: "
159 << address << LOG_ENDL;
163 if (address >= here_address) {
164 LOG(DFATAL) << "EncodeAddress was called with address (" << address
173 address % (same_cache_size() * 256);
174 if (SameAddress(same_cache_pos) == address) {
176 // to the address stream instead of a variable-length integer.
177 UpdateCache(address);
185 VCDAddress best_encoded_address = address;
189 const VCDAddress here_encoded_address = here_address - address;
198 const VCDAddress near_encoded_address = address - NearAddress(i);
206 UpdateCache(address);
213 // points to a valid address in memory.
220 // Checks the given decoded address for validity. Returns true if the
221 // address is valid; otherwise, prints an error message to the log and
226 LOG(ERROR) << "Decoded address " << decoded_address << " is invalid"
230 LOG(ERROR) << "Decoded address (" << decoded_address
239 // which may need to access the SAME or NEAR address cache. Returns the
240 // decoded address.
247 // any other address is invalid.
249 // which tells how to interpret the next value in the address stream.
261 // the address stream buffer. All addresses between *address_stream
262 // and address_stream_end should contain valid address data.
264 // Return value: If the input conditions were met, and the address section
267 // will be returned, representing the address from which data should
269 // If an invalid address value is found in address_stream, then
271 // is reached before the address can be decoded, then
292 // SAME mode expects a byte value as the encoded address
296 // All modes except SAME mode expect a VarintBE as the encoded address
302 "as encoded address value" << LOG_ENDL;
322 // Check for an out-of-bounds address (corrupt/malicious data)