1/*
2 * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
3 */
4
5#ifndef _BSD_ARM_VMPARAM_H_
6#define _BSD_ARM_VMPARAM_H_ 1
7
8#if defined (__arm__) || defined (__arm64__)
9
10#include <sys/resource.h>
11
12#ifndef KERNEL
13#include <TargetConditionals.h>
14#endif
15
16#define USRSTACK (0x27E00000) /* ASLR slides stack down by up to 1MB */
17#define USRSTACK64 (0x000000016FE00000ULL)
18
19/*
20 * Virtual memory related constants, all in bytes
21 */
22#ifndef DFLDSIZ
23#define DFLDSIZ (RLIM_INFINITY) /* initial data size limit */
24#endif
25#ifndef MAXDSIZ
26#define MAXDSIZ (RLIM_INFINITY) /* max data size */
27#endif
28#ifndef DFLSSIZ
29/* XXX stack size default is a platform property: use getrlimit(2) */
30#if (defined(TARGET_OS_OSX) && (TARGET_OS_OSX != 0)) || \
31 (defined(KERNEL) && XNU_TARGET_OS_OSX)
32#define DFLSSIZ (8*1024*1024 - 16*1024)
33#else
34#define DFLSSIZ (1024*1024 - 16*1024) /* initial stack size limit */
35#endif /* TARGET_OS_OSX .. || XNU_KERNEL_PRIVATE .. */
36#endif /* DFLSSIZ */
37#ifndef MAXSSIZ
38/* XXX stack size limit is a platform property: use getrlimit(2) */
39#if (defined(TARGET_OS_OSX) && (TARGET_OS_OSX != 0)) || \
40 (defined(KERNEL) && XNU_TARGET_OS_OSX)
41#define MAXSSIZ (64*1024*1024) /* max stack size */
42#else
43#define MAXSSIZ (1024*1024) /* max stack size */
44#endif /* TARGET_OS_OSX .. || XNU_KERNEL_PRIVATE .. */
45#endif /* MAXSSIZ */
46#ifndef DFLCSIZ
47#define DFLCSIZ (0) /* initial core size limit */
48#endif
49#ifndef MAXCSIZ
50#define MAXCSIZ (RLIM_INFINITY) /* max core size */
51#endif /* MAXCSIZ */
52
53#endif /* defined (__arm__) || defined (__arm64__) */
54
55#endif /* _BSD_ARM_VMPARAM_H_ */
56