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

Side by Side Diff: src/zone.h

Issue 208743004: ASan support for the Zone (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 6 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 | « build/standalone.gypi ('k') | 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 inline unsigned allocation_size() { return allocation_size_; } 83 inline unsigned allocation_size() { return allocation_size_; }
84 84
85 inline Isolate* isolate() { return isolate_; } 85 inline Isolate* isolate() { return isolate_; }
86 86
87 private: 87 private:
88 friend class Isolate; 88 friend class Isolate;
89 89
90 // All pointers returned from New() have this alignment. In addition, if the 90 // All pointers returned from New() have this alignment. In addition, if the
91 // object being allocated has a size that is divisible by 8 then its alignment 91 // object being allocated has a size that is divisible by 8 then its alignment
92 // will be 8. 92 // will be 8. ASan requires 8-byte alignment.
93 #ifdef ADDRESS_SANITIZER
94 static const int kAlignment = 8;
95 STATIC_ASSERT(kPointerSize <= 8);
96 #else
93 static const int kAlignment = kPointerSize; 97 static const int kAlignment = kPointerSize;
98 #endif
94 99
95 // Never allocate segments smaller than this size in bytes. 100 // Never allocate segments smaller than this size in bytes.
96 static const int kMinimumSegmentSize = 8 * KB; 101 static const int kMinimumSegmentSize = 8 * KB;
97 102
98 // Never allocate segments larger than this size in bytes. 103 // Never allocate segments larger than this size in bytes.
99 static const int kMaximumSegmentSize = 1 * MB; 104 static const int kMaximumSegmentSize = 1 * MB;
100 105
101 // Never keep segments larger than this size in bytes around. 106 // Never keep segments larger than this size in bytes around.
102 static const int kMaximumKeptSegmentSize = 64 * KB; 107 static const int kMaximumKeptSegmentSize = 64 * KB;
103 108
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 void operator delete(void* pointer) { UNREACHABLE(); } 257 void operator delete(void* pointer) { UNREACHABLE(); }
253 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } 258 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); }
254 }; 259 };
255 260
256 261
257 typedef TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap; 262 typedef TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap;
258 263
259 } } // namespace v8::internal 264 } } // namespace v8::internal
260 265
261 #endif // V8_ZONE_H_ 266 #endif // V8_ZONE_H_
OLDNEW
« no previous file with comments | « build/standalone.gypi ('k') | src/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698