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

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

Issue 7041004: Revert 8133: Lower heap size limits on systems that are short (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 6 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.h ('k') | src/platform-win32.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 2011 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
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include <utils/Log.h> // LOG_PRI_VA 47 #include <utils/Log.h> // LOG_PRI_VA
48 #endif 48 #endif
49 49
50 #include "v8.h" 50 #include "v8.h"
51 51
52 #include "platform.h" 52 #include "platform.h"
53 53
54 namespace v8 { 54 namespace v8 {
55 namespace internal { 55 namespace internal {
56 56
57
58 // Maximum size of the virtual memory. 0 means there is no artificial
59 // limit.
60
61 intptr_t OS::MaxVirtualMemory() {
62 struct rlimit limit;
63 int result = getrlimit(RLIMIT_DATA, &limit);
64 if (result != 0) return 0;
65 return limit.rlim_cur;
66 }
67
68
69 // ---------------------------------------------------------------------------- 57 // ----------------------------------------------------------------------------
70 // Math functions 58 // Math functions
71 59
72 double modulo(double x, double y) { 60 double modulo(double x, double y) {
73 return fmod(x, y); 61 return fmod(x, y);
74 } 62 }
75 63
76 64
77 double OS::nan_value() { 65 double OS::nan_value() {
78 // NAN from math.h is defined in C99 and not in POSIX. 66 // NAN from math.h is defined in C99 and not in POSIX.
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 return ntohl(value); 415 return ntohl(value);
428 } 416 }
429 417
430 418
431 Socket* OS::CreateSocket() { 419 Socket* OS::CreateSocket() {
432 return new POSIXSocket(); 420 return new POSIXSocket();
433 } 421 }
434 422
435 423
436 } } // namespace v8::internal 424 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698