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

Side by Side Diff: src/ia32/assembler-ia32.cc

Issue 300036: Allow resource constraints to specify the max committed new space size... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 2 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
« src/heap.h ('K') | « src/heap.cc ('k') | src/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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // 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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after
2102 // compute new buffer size 2102 // compute new buffer size
2103 CodeDesc desc; // the new buffer 2103 CodeDesc desc; // the new buffer
2104 if (buffer_size_ < 4*KB) { 2104 if (buffer_size_ < 4*KB) {
2105 desc.buffer_size = 4*KB; 2105 desc.buffer_size = 4*KB;
2106 } else { 2106 } else {
2107 desc.buffer_size = 2*buffer_size_; 2107 desc.buffer_size = 2*buffer_size_;
2108 } 2108 }
2109 // Some internal data structures overflow for very large buffers, 2109 // Some internal data structures overflow for very large buffers,
2110 // they must ensure that kMaximalBufferSize is not too large. 2110 // they must ensure that kMaximalBufferSize is not too large.
2111 if ((desc.buffer_size > kMaximalBufferSize) || 2111 if ((desc.buffer_size > kMaximalBufferSize) ||
2112 (desc.buffer_size > Heap::OldGenerationSize())) { 2112 (desc.buffer_size > Heap::MaxOldGenerationSize())) {
2113 V8::FatalProcessOutOfMemory("Assembler::GrowBuffer"); 2113 V8::FatalProcessOutOfMemory("Assembler::GrowBuffer");
2114 } 2114 }
2115 2115
2116 // setup new buffer 2116 // setup new buffer
2117 desc.buffer = NewArray<byte>(desc.buffer_size); 2117 desc.buffer = NewArray<byte>(desc.buffer_size);
2118 desc.instr_size = pc_offset(); 2118 desc.instr_size = pc_offset();
2119 desc.reloc_size = (buffer_ + buffer_size_) - (reloc_info_writer.pos()); 2119 desc.reloc_size = (buffer_ + buffer_size_) - (reloc_info_writer.pos());
2120 2120
2121 // Clear the buffer in debug mode. Use 'int3' instructions to make 2121 // Clear the buffer in debug mode. Use 'int3' instructions to make
2122 // sure to get into problems if we ever run uninitialized code. 2122 // sure to get into problems if we ever run uninitialized code.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
2258 push_insn[1] = 13; // Skip over coverage insns. 2258 push_insn[1] = 13; // Skip over coverage insns.
2259 if (coverage_log != NULL) { 2259 if (coverage_log != NULL) {
2260 fprintf(coverage_log, "%s\n", file_line); 2260 fprintf(coverage_log, "%s\n", file_line);
2261 fflush(coverage_log); 2261 fflush(coverage_log);
2262 } 2262 }
2263 } 2263 }
2264 2264
2265 #endif 2265 #endif
2266 2266
2267 } } // namespace v8::internal 2267 } } // namespace v8::internal
OLDNEW
« src/heap.h ('K') | « src/heap.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698