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

Side by Side Diff: third_party/WebKit/Source/platform/heap/HeapPage.h

Issue 1950603003: MSan: disable zapping of freelist entries. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | third_party/WebKit/Source/platform/heap/HeapPage.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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 void addToFreeList(Address, size_t); 630 void addToFreeList(Address, size_t);
631 void clear(); 631 void clear();
632 632
633 // Returns a bucket number for inserting a FreeListEntry of a given size. 633 // Returns a bucket number for inserting a FreeListEntry of a given size.
634 // All FreeListEntries in the given bucket, n, have size >= 2^n. 634 // All FreeListEntries in the given bucket, n, have size >= 2^n.
635 static int bucketIndexForSize(size_t); 635 static int bucketIndexForSize(size_t);
636 636
637 // Returns true if the freelist snapshot is captured. 637 // Returns true if the freelist snapshot is captured.
638 bool takeSnapshot(const String& dumpBaseName); 638 bool takeSnapshot(const String& dumpBaseName);
639 639
640 #if ENABLE(ASSERT) || defined(LEAK_SANITIZER) || defined(ADDRESS_SANITIZER) || d efined(MEMORY_SANITIZER) 640 #if (ENABLE(ASSERT) || defined(LEAK_SANITIZER) || defined(ADDRESS_SANITIZER)) && !defined(MEMORY_SANITIZER)
641 static void zapFreedMemory(Address, size_t); 641 static void zapFreedMemory(Address, size_t);
642 static void checkFreedMemoryIsZapped(Address, size_t); 642 static void checkFreedMemoryIsZapped(Address, size_t);
643 #endif 643 #endif
644 644
645 private: 645 private:
646 int m_biggestFreeListIndex; 646 int m_biggestFreeListIndex;
647 647
648 // All FreeListEntries in the nth list have size >= 2^n. 648 // All FreeListEntries in the nth list have size >= 2^n.
649 FreeListEntry* m_freeLists[blinkPageSizeLog2]; 649 FreeListEntry* m_freeLists[blinkPageSizeLog2];
650 650
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 SET_MEMORY_ACCESSIBLE(result, allocationSize - sizeof(HeapObjectHeader)) ; 912 SET_MEMORY_ACCESSIBLE(result, allocationSize - sizeof(HeapObjectHeader)) ;
913 ASSERT(findPageFromAddress(headerAddress + allocationSize - 1)); 913 ASSERT(findPageFromAddress(headerAddress + allocationSize - 1));
914 return result; 914 return result;
915 } 915 }
916 return outOfLineAllocate(allocationSize, gcInfoIndex); 916 return outOfLineAllocate(allocationSize, gcInfoIndex);
917 } 917 }
918 918
919 } // namespace blink 919 } // namespace blink
920 920
921 #endif // HeapPage_h 921 #endif // HeapPage_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/HeapPage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698