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

Side by Side Diff: Source/wtf/ListHashSet.h

Issue 357603002: split MEMORY_TOOL_REPLACES_ALLOCATOR into initial size and malloc. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « Source/wtf/HashTraits.h ('k') | Source/wtf/Vector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com> 3 * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } 331 }
332 332
333 static void traceValue(typename DefaultAllocator::Visitor* visitor, Node * node) { } 333 static void traceValue(typename DefaultAllocator::Visitor* visitor, Node * node) { }
334 334
335 private: 335 private:
336 Node* pool() { return reinterpret_cast_ptr<Node*>(m_pool.buffer); } 336 Node* pool() { return reinterpret_cast_ptr<Node*>(m_pool.buffer); }
337 Node* pastPool() { return pool() + m_poolSize; } 337 Node* pastPool() { return pool() + m_poolSize; }
338 338
339 Node* m_freeList; 339 Node* m_freeList;
340 bool m_isDoneWithInitialFreeList; 340 bool m_isDoneWithInitialFreeList;
341 #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) 341 #if defined(MEMORY_SANITIZER_INITIAL_SIZE)
342 // The allocation pool for nodes is one big chunk that ASAN has no 342 // The allocation pool for nodes is one big chunk that ASAN has no
343 // insight into, so it can cloak errors. Make it as small as possible 343 // insight into, so it can cloak errors. Make it as small as possible
344 // to force nodes to be allocated individually where ASAN can see them. 344 // to force nodes to be allocated individually where ASAN can see them.
345 static const size_t m_poolSize = 1; 345 static const size_t m_poolSize = 1;
346 #else 346 #else
347 static const size_t m_poolSize = inlineCapacity; 347 static const size_t m_poolSize = inlineCapacity;
348 #endif 348 #endif
349 AlignedBuffer<sizeof(NodeBase) * m_poolSize, WTF_ALIGN_OF(NodeBase)> m_p ool; 349 AlignedBuffer<sizeof(NodeBase) * m_poolSize, WTF_ALIGN_OF(NodeBase)> m_p ool;
350 }; 350 };
351 351
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 struct NeedsTracing<ListHashSet<T, U, V> > { 1008 struct NeedsTracing<ListHashSet<T, U, V> > {
1009 static const bool value = false; 1009 static const bool value = false;
1010 }; 1010 };
1011 #endif 1011 #endif
1012 1012
1013 } // namespace WTF 1013 } // namespace WTF
1014 1014
1015 using WTF::ListHashSet; 1015 using WTF::ListHashSet;
1016 1016
1017 #endif /* WTF_ListHashSet_h */ 1017 #endif /* WTF_ListHashSet_h */
OLDNEW
« no previous file with comments | « Source/wtf/HashTraits.h ('k') | Source/wtf/Vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698