2 * Copyright (c) 2014 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.
7 #include "native_client/src/include/minsfi_syscalls.h"
9 int32_t __minsfi_syscall_heaplim(sfiptr_t dest_lower_limit,
10 sfiptr_t dest_upper_limit) {
11 const MinsfiSandbox *sb = MinsfiGetActiveSandbox();
13 sfiptr_t val_lower_limit = sb->mem_layout.heap.offset;
14 sfiptr_t val_upper_limit = val_lower_limit + sb->mem_layout.heap.length;
16 MinsfiCopyToSandbox(dest_lower_limit, &val_lower_limit,
17 sizeof(val_lower_limit), sb);
18 MinsfiCopyToSandbox(dest_upper_limit, &val_upper_limit,
19 sizeof(val_upper_limit), sb);