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

Side by Side Diff: src/heap/spaces.h

Issue 1024823002: Fix OOM bug 3976. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix signed/unsigned comparison Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_SPACES_H_ 5 #ifndef V8_HEAP_SPACES_H_
6 #define V8_HEAP_SPACES_H_ 6 #define V8_HEAP_SPACES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1864 1864
1865 // Returns the number of total pages in this space. 1865 // Returns the number of total pages in this space.
1866 int CountTotalPages(); 1866 int CountTotalPages();
1867 1867
1868 // Return size of allocatable area on a page in this space. 1868 // Return size of allocatable area on a page in this space.
1869 inline int AreaSize() { return area_size_; } 1869 inline int AreaSize() { return area_size_; }
1870 1870
1871 void CreateEmergencyMemory(); 1871 void CreateEmergencyMemory();
1872 void FreeEmergencyMemory(); 1872 void FreeEmergencyMemory();
1873 void UseEmergencyMemory(); 1873 void UseEmergencyMemory();
1874 intptr_t MaxEmergencyMemoryAllocated();
1874 1875
1875 bool HasEmergencyMemory() { return emergency_memory_ != NULL; } 1876 bool HasEmergencyMemory() { return emergency_memory_ != NULL; }
1876 1877
1877 protected: 1878 protected:
1878 FreeList* free_list() { return &free_list_; } 1879 FreeList* free_list() { return &free_list_; }
1879 1880
1880 int area_size_; 1881 int area_size_;
1881 1882
1882 // Maximum capacity of this space. 1883 // Maximum capacity of this space.
1883 intptr_t max_capacity_; 1884 intptr_t max_capacity_;
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 count = 0; 2864 count = 0;
2864 } 2865 }
2865 // Must be small, since an iteration is used for lookup. 2866 // Must be small, since an iteration is used for lookup.
2866 static const int kMaxComments = 64; 2867 static const int kMaxComments = 64;
2867 }; 2868 };
2868 #endif 2869 #endif
2869 } 2870 }
2870 } // namespace v8::internal 2871 } // namespace v8::internal
2871 2872
2872 #endif // V8_HEAP_SPACES_H_ 2873 #endif // V8_HEAP_SPACES_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698