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

Side by Side Diff: content/zygote/zygote_main_linux.cc

Issue 227113011: Expose the virtual memory limit to blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 6 years, 8 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 | « content/child/blink_platform_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/zygote/zygote_main.h" 5 #include "content/zygote/zygote_main.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <pthread.h> 10 #include <pthread.h>
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 304 }
305 } 305 }
306 #endif 306 #endif
307 307
308 // This function triggers the static and lazy construction of objects that need 308 // This function triggers the static and lazy construction of objects that need
309 // to be created before imposing the sandbox. 309 // to be created before imposing the sandbox.
310 static void ZygotePreSandboxInit() { 310 static void ZygotePreSandboxInit() {
311 base::RandUint64(); 311 base::RandUint64();
312 312
313 base::SysInfo::AmountOfPhysicalMemory(); 313 base::SysInfo::AmountOfPhysicalMemory();
314 base::SysInfo::AmountOfVirtualMemory();
314 base::SysInfo::MaxSharedMemorySize(); 315 base::SysInfo::MaxSharedMemorySize();
315 base::SysInfo::NumberOfProcessors(); 316 base::SysInfo::NumberOfProcessors();
316 317
317 // ICU DateFormat class (used in base/time_format.cc) needs to get the 318 // ICU DateFormat class (used in base/time_format.cc) needs to get the
318 // Olson timezone ID by accessing the zoneinfo files on disk. After 319 // Olson timezone ID by accessing the zoneinfo files on disk. After
319 // TimeZone::createDefault is called once here, the timezone ID is 320 // TimeZone::createDefault is called once here, the timezone ID is
320 // cached and there's no more need to access the file system. 321 // cached and there's no more need to access the file system.
321 scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault()); 322 scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
322 323
323 #if defined(USE_NSS) 324 #if defined(USE_NSS)
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 EnterLayerOneSandbox(linux_sandbox); 467 EnterLayerOneSandbox(linux_sandbox);
467 468
468 int sandbox_flags = linux_sandbox->GetStatus(); 469 int sandbox_flags = linux_sandbox->GetStatus();
469 470
470 Zygote zygote(sandbox_flags, forkdelegate); 471 Zygote zygote(sandbox_flags, forkdelegate);
471 // This function call can return multiple times, once per fork(). 472 // This function call can return multiple times, once per fork().
472 return zygote.ProcessRequests(); 473 return zygote.ProcessRequests();
473 } 474 }
474 475
475 } // namespace content 476 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698