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

Side by Side Diff: src/zone.h

Issue 18034006: Turn zone_excess_limit_ into a constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « no previous file | src/zone.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // will be 8. 84 // will be 8.
85 static const int kAlignment = kPointerSize; 85 static const int kAlignment = kPointerSize;
86 86
87 // Never allocate segments smaller than this size in bytes. 87 // Never allocate segments smaller than this size in bytes.
88 static const int kMinimumSegmentSize = 8 * KB; 88 static const int kMinimumSegmentSize = 8 * KB;
89 89
90 // Never allocate segments larger than this size in bytes. 90 // Never allocate segments larger than this size in bytes.
91 static const int kMaximumSegmentSize = 1 * MB; 91 static const int kMaximumSegmentSize = 1 * MB;
92 92
93 // Report zone excess when allocation exceeds this limit. 93 // Report zone excess when allocation exceeds this limit.
94 int zone_excess_limit_; 94 static const int kExcessLimit = 256 * MB;
95 95
96 // The number of bytes allocated in this zone so far. 96 // The number of bytes allocated in this zone so far.
97 unsigned allocation_size_; 97 unsigned allocation_size_;
98 98
99 // The number of bytes allocated in segments. Note that this number 99 // The number of bytes allocated in segments. Note that this number
100 // includes memory allocated from the OS but not yet allocated from 100 // includes memory allocated from the OS but not yet allocated from
101 // the zone. 101 // the zone.
102 int segment_bytes_allocated_; 102 int segment_bytes_allocated_;
103 103
104 // Expand the Zone to hold at least 'size' more bytes and allocate 104 // Expand the Zone to hold at least 'size' more bytes and allocate
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 : SplayTree<Config, ZoneAllocationPolicy>(ZoneAllocationPolicy(zone)) {} 222 : SplayTree<Config, ZoneAllocationPolicy>(ZoneAllocationPolicy(zone)) {}
223 ~ZoneSplayTree(); 223 ~ZoneSplayTree();
224 }; 224 };
225 225
226 226
227 typedef TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap; 227 typedef TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap;
228 228
229 } } // namespace v8::internal 229 } } // namespace v8::internal
230 230
231 #endif // V8_ZONE_H_ 231 #endif // V8_ZONE_H_
OLDNEW
« no previous file with comments | « no previous file | src/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698