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

Side by Side Diff: third_party/WebKit/Source/wtf/PartitionAllocator.h

Issue 1845923005: CL for perf tryjob on android Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 class PartitionAllocatorDummyVisitor; 47 class PartitionAllocatorDummyVisitor;
48 48
49 class WTF_EXPORT PartitionAllocator { 49 class WTF_EXPORT PartitionAllocator {
50 public: 50 public:
51 typedef PartitionAllocatorDummyVisitor Visitor; 51 typedef PartitionAllocatorDummyVisitor Visitor;
52 static const bool isGarbageCollected = false; 52 static const bool isGarbageCollected = false;
53 53
54 template<typename T> 54 template<typename T>
55 static size_t quantizedSize(size_t count) 55 static size_t quantizedSize(size_t count)
56 { 56 {
57 CHECK_LE(count, kGenericMaxDirectMapped / sizeof(T)); 57 RELEASE_ASSERT(count <= kGenericMaxDirectMapped / sizeof(T));
58 return partitionAllocActualSize(Partitions::bufferPartition(), count * s izeof(T)); 58 return partitionAllocActualSize(Partitions::bufferPartition(), count * s izeof(T));
59 } 59 }
60 template <typename T> 60 template <typename T>
61 static T* allocateVectorBacking(size_t size) 61 static T* allocateVectorBacking(size_t size)
62 { 62 {
63 return reinterpret_cast<T*>(allocateBacking(size, WTF_HEAP_PROFILER_TYPE _NAME(T))); 63 return reinterpret_cast<T*>(allocateBacking(size, WTF_HEAP_PROFILER_TYPE _NAME(T)));
64 } 64 }
65 template <typename T> 65 template <typename T>
66 static T* allocateExpandedVectorBacking(size_t size) 66 static T* allocateExpandedVectorBacking(size_t size)
67 { 67 {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 { \ 215 { \
216 ASSERT(location); \ 216 ASSERT(location); \
217 return location; \ 217 return location; \
218 } \ 218 } \
219 private: \ 219 private: \
220 typedef int __thisIsHereToForceASemicolonAfterThisMacro 220 typedef int __thisIsHereToForceASemicolonAfterThisMacro
221 221
222 using WTF::PartitionAllocator; 222 using WTF::PartitionAllocator;
223 223
224 #endif // WTF_PartitionAllocator_h 224 #endif // WTF_PartitionAllocator_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/PartitionAlloc.cpp ('k') | third_party/WebKit/Source/wtf/Partitions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698