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

Side by Side Diff: src/spaces.cc

Issue 9605014: Ignore soft heap limit when reserving space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comment Created 8 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.cc ('k') | no next file » | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 2210
2211 SetTop(new_area->address(), new_area->address() + size_in_bytes); 2211 SetTop(new_area->address(), new_area->address() + size_in_bytes);
2212 Allocate(size_in_bytes); 2212 Allocate(size_in_bytes);
2213 return true; 2213 return true;
2214 } 2214 }
2215 2215
2216 2216
2217 // You have to call this last, since the implementation from PagedSpace 2217 // You have to call this last, since the implementation from PagedSpace
2218 // doesn't know that memory was 'promised' to large object space. 2218 // doesn't know that memory was 'promised' to large object space.
2219 bool LargeObjectSpace::ReserveSpace(int bytes) { 2219 bool LargeObjectSpace::ReserveSpace(int bytes) {
2220 return heap()->OldGenerationSpaceAvailable() >= bytes; 2220 return heap()->OldGenerationCapacityAvailable() >= bytes &&
2221 (!heap()->incremental_marking()->IsStopped() ||
2222 heap()->OldGenerationSpaceAvailable() >= bytes);
2221 } 2223 }
2222 2224
2223 2225
2224 bool PagedSpace::AdvanceSweeper(intptr_t bytes_to_sweep) { 2226 bool PagedSpace::AdvanceSweeper(intptr_t bytes_to_sweep) {
2225 if (IsSweepingComplete()) return true; 2227 if (IsSweepingComplete()) return true;
2226 2228
2227 intptr_t freed_bytes = 0; 2229 intptr_t freed_bytes = 0;
2228 Page* p = first_unswept_page_; 2230 Page* p = first_unswept_page_;
2229 do { 2231 do {
2230 Page* next_page = p->next_page(); 2232 Page* next_page = p->next_page();
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
2782 object->ShortPrint(); 2784 object->ShortPrint();
2783 PrintF("\n"); 2785 PrintF("\n");
2784 } 2786 }
2785 printf(" --------------------------------------\n"); 2787 printf(" --------------------------------------\n");
2786 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 2788 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
2787 } 2789 }
2788 2790
2789 #endif // DEBUG 2791 #endif // DEBUG
2790 2792
2791 } } // namespace v8::internal 2793 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698