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

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

Issue 23703013: remove OS::StackWalk (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 7 years, 3 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/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 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 #endif 306 #endif
307 MAP_PRIVATE, 307 MAP_PRIVATE,
308 fileno(f), 308 fileno(f),
309 0); 309 0);
310 ASSERT(addr != MAP_FAILED); 310 ASSERT(addr != MAP_FAILED);
311 OS::Free(addr, size); 311 OS::Free(addr, size);
312 fclose(f); 312 fclose(f);
313 } 313 }
314 314
315 315
316 int OS::StackWalk(Vector<OS::StackFrame> frames) {
317 // backtrace is a glibc extension.
318 #if defined(__GLIBC__) && !defined(__UCLIBC__)
319 return POSIXBacktraceHelper<backtrace, backtrace_symbols>::StackWalk(frames);
320 #else
321 return 0;
322 #endif
323 }
324
325
326 // Constants used for mmap. 316 // Constants used for mmap.
327 static const int kMmapFd = -1; 317 static const int kMmapFd = -1;
328 static const int kMmapFdOffset = 0; 318 static const int kMmapFdOffset = 0;
329 319
330 320
331 VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { } 321 VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { }
332 322
333 323
334 VirtualMemory::VirtualMemory(size_t size) 324 VirtualMemory::VirtualMemory(size_t size)
335 : address_(ReserveRegion(size)), size_(size) { } 325 : address_(ReserveRegion(size)), size_(size) { }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 bool VirtualMemory::ReleaseRegion(void* base, size_t size) { 449 bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
460 return munmap(base, size) == 0; 450 return munmap(base, size) == 0;
461 } 451 }
462 452
463 453
464 bool VirtualMemory::HasLazyCommits() { 454 bool VirtualMemory::HasLazyCommits() {
465 return true; 455 return true;
466 } 456 }
467 457
468 } } // namespace v8::internal 458 } } // 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