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

Unified Diff: third_party/tcmalloc/chromium/src/common.h

Issue 11857007: TCMalloc: restrict maximum size of memory ranges (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Drive-by patch of int to size_t. Created 7 years, 11 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: third_party/tcmalloc/chromium/src/common.h
diff --git a/third_party/tcmalloc/chromium/src/common.h b/third_party/tcmalloc/chromium/src/common.h
index c8ceb61ca6ea64fd02e8236840cf91ca42a6844f..84c5c37be9ef4cea805b7e936f71fe8984beb649 100644
--- a/third_party/tcmalloc/chromium/src/common.h
+++ b/third_party/tcmalloc/chromium/src/common.h
@@ -144,6 +144,10 @@ inline Length pages(size_t bytes) {
((bytes & (kPageSize - 1)) > 0 ? 1 : 0);
}
+// For security reasons, we want to limit the size of allocations.
+// See crbug.com/169327.
+bool IsAllocSizePermitted(size_t alloc_size);
Chris Evans 2013/01/15 01:53:08 Mark it inline. Any maybe have the implementation
jln (very slow on Chromium) 2013/01/15 02:00:51 Let me know how strongly you feel about it. Since
+
// For larger allocation sizes, we use larger memory alignments to
// reduce the number of size classes.
int AlignmentForSize(size_t size);

Powered by Google App Engine
This is Rietveld 408576698