// so we can't use these syscalls. Maybe one day when all supported platforms
// have them.
-#if 0
- // this block implements what is described above
- // note this needs
- // #include "pub_core_libcproc.h"
- SizeT kern_maxssiz;
- SizeT kern_sgrowsiz;
- SizeT sysctl_size = sizeof(SizeT);
- VG_(sysctlbyname)("kern.maxssiz", &kern_maxssiz, &sysctl_size, NULL, 0);
- VG_(sysctlbyname)("kern.sgrowsiz", &kern_sgrowsiz, &sysctl_size, NULL, 0);
- VG_(printf)("maxssiz %lx\n", kern_maxssiz);
- //suggested_clstack_end = aspacem_maxAddr - (kern_maxssiz - kern_sgrowsiz) + VKI_PAGE_SIZE;
-#endif
-
// on amd64 we have oodles of space and just shove the new stack somewhere out of the way
// x86 is far more constrained, and we put the new stack just below the stack passed in to V
// except that it has stack space and the growth stack guard below it as decribed above
suggested_clstack_end = aspacem_maxAddr - 64*1024*1024UL
+ VKI_PAGE_SIZE;
#else
- suggested_clstack_end = aspacem_maxAddr;
+ //suggested_clstack_end = aspacem_maxAddr;
+ // this block implements what is described above
+ // note this needs
+ // #include "pub_core_libcproc.h"
+ SizeT kern_maxssiz;
+ SizeT kern_sgrowsiz;
+ SizeT sysctl_size = sizeof(SizeT);
+ VG_(sysctlbyname)("kern.maxssiz", &kern_maxssiz, &sysctl_size, NULL, 0);
+ VG_(sysctlbyname)("kern.sgrowsiz", &kern_sgrowsiz, &sysctl_size, NULL, 0);
+ //VG_(printf)("maxssiz %lx\n", kern_maxssiz);
+ suggested_clstack_end = aspacem_maxAddr - (kern_maxssiz - kern_sgrowsiz) + VKI_PAGE_SIZE;
+
#endif
// --- Solaris ------------------------------------------