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

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

Issue 2019273002: Make reallocation of large objects reliable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 Address lazySweep(size_t, size_t gcInfoIndex); 687 Address lazySweep(size_t, size_t gcInfoIndex);
688 void sweepUnsweptPage(); 688 void sweepUnsweptPage();
689 // Returns true if we have swept all pages within the deadline. 689 // Returns true if we have swept all pages within the deadline.
690 // Returns false otherwise. 690 // Returns false otherwise.
691 bool lazySweepWithDeadline(double deadlineSeconds); 691 bool lazySweepWithDeadline(double deadlineSeconds);
692 void completeSweep(); 692 void completeSweep();
693 693
694 ThreadState* getThreadState() { return m_threadState; } 694 ThreadState* getThreadState() { return m_threadState; }
695 int arenaIndex() const { return m_index; } 695 int arenaIndex() const { return m_index; }
696 696
697 Address allocateLargeObject(size_t allocationSize, size_t gcInfoIndex);
698
697 protected: 699 protected:
698 BasePage* m_firstPage; 700 BasePage* m_firstPage;
699 BasePage* m_firstUnsweptPage; 701 BasePage* m_firstUnsweptPage;
700 702
701 private: 703 private:
702 virtual Address lazySweepPages(size_t, size_t gcInfoIndex) = 0; 704 virtual Address lazySweepPages(size_t, size_t gcInfoIndex) = 0;
703 705
704 ThreadState* m_threadState; 706 ThreadState* m_threadState;
705 707
706 // Index into the page pools. This is used to ensure that the pages of the 708 // Index into the page pools. This is used to ensure that the pages of the
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 SET_MEMORY_ACCESSIBLE(result, allocationSize - sizeof(HeapObjectHeader)) ; 915 SET_MEMORY_ACCESSIBLE(result, allocationSize - sizeof(HeapObjectHeader)) ;
914 ASSERT(findPageFromAddress(headerAddress + allocationSize - 1)); 916 ASSERT(findPageFromAddress(headerAddress + allocationSize - 1));
915 return result; 917 return result;
916 } 918 }
917 return outOfLineAllocate(allocationSize, gcInfoIndex); 919 return outOfLineAllocate(allocationSize, gcInfoIndex);
918 } 920 }
919 921
920 } // namespace blink 922 } // namespace blink
921 923
922 #endif // HeapPage_h 924 #endif // HeapPage_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.h ('k') | third_party/WebKit/Source/platform/heap/HeapPage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698