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

Side by Side Diff: src/platform-linux.cc

Issue 545125: Initial Solaris support (Closed)
Patch Set: Fixed comments, simplified platform-solaris Created 10 years, 11 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
« no previous file with comments | « src/platform-freebsd.cc ('k') | src/platform-macos.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // runtime system. 152 // runtime system.
153 return 8; 153 return 8;
154 #else 154 #else
155 // With gcc 4.4 the tree vectorization optimiser can generate code 155 // With gcc 4.4 the tree vectorization optimiser can generate code
156 // that requires 16 byte alignment such as movdqa on x86. 156 // that requires 16 byte alignment such as movdqa on x86.
157 return 16; 157 return 16;
158 #endif 158 #endif
159 } 159 }
160 160
161 161
162 const char* OS::LocalTimezone(double time) {
163 if (isnan(time)) return "";
164 time_t tv = static_cast<time_t>(floor(time/msPerSecond));
165 struct tm* t = localtime(&tv);
166 if (NULL == t) return "";
167 return t->tm_zone;
168 }
169
170
171 double OS::LocalTimeOffset() {
172 time_t tv = time(NULL);
173 struct tm* t = localtime(&tv);
174 // tm_gmtoff includes any daylight savings offset, so subtract it.
175 return static_cast<double>(t->tm_gmtoff * msPerSecond -
176 (t->tm_isdst > 0 ? 3600 * msPerSecond : 0));
177 }
178
179
162 // We keep the lowest and highest addresses mapped as a quick way of 180 // We keep the lowest and highest addresses mapped as a quick way of
163 // determining that pointers are outside the heap (used mostly in assertions 181 // determining that pointers are outside the heap (used mostly in assertions
164 // and verification). The estimate is conservative, ie, not all addresses in 182 // and verification). The estimate is conservative, ie, not all addresses in
165 // 'allocated' space are actually allocated to our heap. The range is 183 // 'allocated' space are actually allocated to our heap. The range is
166 // [lowest, highest), inclusive on the low and and exclusive on the high end. 184 // [lowest, highest), inclusive on the low and and exclusive on the high end.
167 static void* lowest_ever_allocated = reinterpret_cast<void*>(-1); 185 static void* lowest_ever_allocated = reinterpret_cast<void*>(-1);
168 static void* highest_ever_allocated = reinterpret_cast<void*>(0); 186 static void* highest_ever_allocated = reinterpret_cast<void*>(0);
169 187
170 188
171 static void UpdateAllocatedSpaceLimits(void* address, int size) { 189 static void UpdateAllocatedSpaceLimits(void* address, int size) {
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 817
800 // This sampler is no longer the active sampler. 818 // This sampler is no longer the active sampler.
801 active_sampler_ = NULL; 819 active_sampler_ = NULL;
802 active_ = false; 820 active_ = false;
803 } 821 }
804 822
805 823
806 #endif // ENABLE_LOGGING_AND_PROFILING 824 #endif // ENABLE_LOGGING_AND_PROFILING
807 825
808 } } // namespace v8::internal 826 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-freebsd.cc ('k') | src/platform-macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698