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

Side by Side Diff: src/zone.cc

Issue 6577036: [Isolates] Merge from bleeding_edge to isolates, revisions 6100-6300. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 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/zone.h ('k') | src/zone-inl.h » ('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 2006-2008 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
11 // with the distribution. 11 // with the distribution.
(...skipping 23 matching lines...) Expand all
35 35
36 36
37 Zone::Zone() 37 Zone::Zone()
38 : zone_excess_limit_(256 * MB), 38 : zone_excess_limit_(256 * MB),
39 segment_bytes_allocated_(0), 39 segment_bytes_allocated_(0),
40 position_(0), 40 position_(0),
41 limit_(0), 41 limit_(0),
42 scope_nesting_(0), 42 scope_nesting_(0),
43 segment_head_(NULL) { 43 segment_head_(NULL) {
44 } 44 }
45 unsigned Zone::allocation_size_ = 0;
45 46
46 47
47 ZoneScope::~ZoneScope() { 48 ZoneScope::~ZoneScope() {
48 ASSERT_EQ(Isolate::Current(), isolate_); 49 ASSERT_EQ(Isolate::Current(), isolate_);
49 if (ShouldDeleteOnExit()) isolate_->zone()->DeleteAll(); 50 if (ShouldDeleteOnExit()) isolate_->zone()->DeleteAll();
50 isolate_->zone()->scope_nesting_--; 51 isolate_->zone()->scope_nesting_--;
51 } 52 }
52 53
53 54
54 // Segments represent chunks of memory: They have starting address 55 // Segments represent chunks of memory: They have starting address
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // Recompute 'top' and 'limit' based on the new segment. 187 // Recompute 'top' and 'limit' based on the new segment.
187 Address result = RoundUp(segment->start(), kAlignment); 188 Address result = RoundUp(segment->start(), kAlignment);
188 position_ = result + size; 189 position_ = result + size;
189 limit_ = segment->end(); 190 limit_ = segment->end();
190 ASSERT(position_ <= limit_); 191 ASSERT(position_ <= limit_);
191 return result; 192 return result;
192 } 193 }
193 194
194 195
195 } } // namespace v8::internal 196 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/zone.h ('k') | src/zone-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698