[kaffe] CVS kaffe (guilhem): Detect stack size on Darwin/PPC.
Kaffe CVS
Kaffe Mailing List <kaffe@kaffe.org>
Sun May 30 13:22:02 2004
PatchSet 4796
Date: 2004/05/30 20:16:41
Author: guilhem
Branch: HEAD
Tag: (none)
Log:
Detect stack size on Darwin/PPC.
* config/powerpc/darwin/md.h
(mdGetStackSize): Implemented for Darwin/PPC.
Members:
ChangeLog:1.2365->1.2366
config/powerpc/darwin/md.h:1.3->1.4
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2365 kaffe/ChangeLog:1.2366
--- kaffe/ChangeLog:1.2365 Sun May 30 16:30:42 2004
+++ kaffe/ChangeLog Sun May 30 20:16:41 2004
@@ -1,5 +1,10 @@
2004-05-30 Guilhem Lavaux <guilhem@kaffe.org>
+ * config/powerpc/darwin/md.h
+ (mdGetStackSize): Implemented for Darwin/PPC.
+
+2004-05-30 Guilhem Lavaux <guilhem@kaffe.org>
+
* libraries/javalib/java/util/ZipInputStream.java
(getNextEntry): Reopen the byte stream.
(closeEntry): Close the byte stream.
Index: kaffe/config/powerpc/darwin/md.h
diff -u kaffe/config/powerpc/darwin/md.h:1.3 kaffe/config/powerpc/darwin/md.h:1.4
--- kaffe/config/powerpc/darwin/md.h:1.3 Tue Apr 27 18:25:17 2004
+++ kaffe/config/powerpc/darwin/md.h Sun May 30 20:16:43 2004
@@ -33,4 +33,19 @@
#undef HAVE_SIGALTSTACK
#endif
+#if defined(HAVE_GETRLIMIT)
+#define KAFFEMD_STACKSIZE
+
+static inline rlim_t mdGetStackSize(void)
+{
+ struct rlimit rl;
+
+ if (getrlimit(RLIMIT_STACK, &rl) < 0)
+ return 0;
+ else
+ return (rl.rlim_max >= RLIM_INFINITY) ? rl.rlim_cur : rl.rlim_max;
+}
+#endif
+
+
#endif