1 : /*
2 : * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 : * Use of this source code is governed by a BSD-style license that can be
4 : * found in the LICENSE file.
5 : */
6 :
7 : #include "native_client/src/shared/platform/nacl_log.h"
8 : #include "native_client/src/trusted/service_runtime/sel_addrspace.h"
9 :
10 : /*
11 : * The launcher passes --reserved_at_zero=0xXXXXXXXXXXXXXXXX.
12 : * nacl_helper_bootstrap replaces the Xs wih the size of the
13 : * prereserved sandbox memory.
14 : */
15 290 : void NaClHandleReservedAtZero(const char *switch_value) {
16 290 : char *endp = NULL;
17 290 : size_t prereserved_sandbox_size = (size_t) strtoul(switch_value, &endp, 0);
18 290 : if (*endp != '\0') {
19 0 : NaClLog(LOG_FATAL, "NaClHandleReservedAtZero: Could not parse"
20 : " reserved_at_zero argument value of %s\n", switch_value);
21 : }
22 290 : g_prereserved_sandbox_size = prereserved_sandbox_size;
23 290 : }
|