Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Unified Diff: base/pickle.h

Issue 1249643007: Align base::Pickle allocations to 4k boundaries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@accounting_fix
Patch Set: Nits test Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/pickle.h
diff --git a/base/pickle.h b/base/pickle.h
index c9fef715a7b6e9e8f9b4a357905f2cd9c442a1f7..40a983b80e046a7a625528c3de6ccf1dfd67faa4 100644
--- a/base/pickle.h
+++ b/base/pickle.h
@@ -74,11 +74,6 @@ class BASE_EXPORT PickleIterator {
}
private:
- // Aligns 'i' by rounding it up to the next multiple of 'alignment'.
- static size_t AlignInt(size_t i, int alignment) {
- return i + (alignment - (i % alignment)) % alignment;
- }
-
// Read Type from Pickle.
template <typename Type>
bool ReadBuiltinType(Type* result);
@@ -270,11 +265,6 @@ class BASE_EXPORT Pickle {
// of the header.
void Resize(size_t new_capacity);
- // Aligns 'i' by rounding it up to the next multiple of 'alignment'
- static size_t AlignInt(size_t i, int alignment) {
- return i + (alignment - (i % alignment)) % alignment;
- }
-
// Find the end of the pickled data that starts at range_start. Returns NULL
// if the entire Pickle is not found in the given data range.
static const char* FindNext(size_t header_size,

Powered by Google App Engine
This is Rietveld 408576698