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

Side by Side Diff: Source/platform/heap/Heap.h

Issue 808253004: Revert "Oilpan: Expand HashTableBacking buffer when possible" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/platform/heap/Heap.cpp » ('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) 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 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 static T* allocateHashTableBacking(size_t size) 1497 static T* allocateHashTableBacking(size_t size)
1498 { 1498 {
1499 return reinterpret_cast<T*>(Heap::allocate<HeapHashTableBacking<HashTabl e>, HeapIndexTrait<HashTableBackingHeap>>(size)); 1499 return reinterpret_cast<T*>(Heap::allocate<HeapHashTableBacking<HashTabl e>, HeapIndexTrait<HashTableBackingHeap>>(size));
1500 } 1500 }
1501 template <typename T, typename HashTable> 1501 template <typename T, typename HashTable>
1502 static T* allocateZeroedHashTableBacking(size_t size) 1502 static T* allocateZeroedHashTableBacking(size_t size)
1503 { 1503 {
1504 return allocateHashTableBacking<T, HashTable>(size); 1504 return allocateHashTableBacking<T, HashTable>(size);
1505 } 1505 }
1506 PLATFORM_EXPORT static void freeHashTableBacking(void* address); 1506 PLATFORM_EXPORT static void freeHashTableBacking(void* address);
1507 PLATFORM_EXPORT static bool expandHashTableBacking(void*, size_t);
1508 1507
1509 template <typename Return, typename Metadata> 1508 template <typename Return, typename Metadata>
1510 static Return malloc(size_t size) 1509 static Return malloc(size_t size)
1511 { 1510 {
1512 return reinterpret_cast<Return>(Heap::allocate<Metadata>(size)); 1511 return reinterpret_cast<Return>(Heap::allocate<Metadata>(size));
1513 } 1512 }
1514 static void free(void* address) { } 1513 static void free(void* address) { }
1515 template<typename T> 1514 template<typename T>
1516 static void* newArray(size_t bytes) 1515 static void* newArray(size_t bytes)
1517 { 1516 {
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
2427 template<typename T, size_t inlineCapacity> 2426 template<typename T, size_t inlineCapacity>
2428 struct GCInfoTrait<HeapVector<T, inlineCapacity>> : public GCInfoTrait<Vector<T, inlineCapacity, HeapAllocator>> { }; 2427 struct GCInfoTrait<HeapVector<T, inlineCapacity>> : public GCInfoTrait<Vector<T, inlineCapacity, HeapAllocator>> { };
2429 template<typename T, size_t inlineCapacity> 2428 template<typename T, size_t inlineCapacity>
2430 struct GCInfoTrait<HeapDeque<T, inlineCapacity>> : public GCInfoTrait<Deque<T, i nlineCapacity, HeapAllocator>> { }; 2429 struct GCInfoTrait<HeapDeque<T, inlineCapacity>> : public GCInfoTrait<Deque<T, i nlineCapacity, HeapAllocator>> { };
2431 template<typename T, typename U, typename V> 2430 template<typename T, typename U, typename V>
2432 struct GCInfoTrait<HeapHashCountedSet<T, U, V>> : public GCInfoTrait<HashCounted Set<T, U, V, HeapAllocator>> { }; 2431 struct GCInfoTrait<HeapHashCountedSet<T, U, V>> : public GCInfoTrait<HashCounted Set<T, U, V, HeapAllocator>> { };
2433 2432
2434 } // namespace blink 2433 } // namespace blink
2435 2434
2436 #endif // Heap_h 2435 #endif // Heap_h
OLDNEW
« no previous file with comments | « no previous file | Source/platform/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698