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