Francisco Jesús Martínez Serrano wrote:
As I said:
My STACKSIZE environment variable is set to 1024, but setting it to 512MB makes
no difference.
I've already read that documentation, and I think the problem is with the main
stack, since the size of each thread stack changes accordingly to the STACKSIZE
(so that is correct). Also, if you look at the rsp from the core it's at the
main stack.
The -xcheck=stkovf is not useful for me since it only works for Sparc.
Now I get it...
I played w/ this a bit w/ the following program:
[EMAIL PROTECTED]:/tmp 56% cat stack.c
#include <stdio.h>
#include <strings.h>
#include <unistd.h>
#include <alloca.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
char *foo;
int size;
if (argc != 2) {
fprintf(stderr, "usage: %s kilobytes\n", argv[0]);
exit(1);
}
size = atoi(argv[1]);
printf("allocating %d k...", size);
fflush(stdout);
size *= 1024;
foo = alloca(size);
foo[size - 1] = 0; /* try and set last byte */
printf("worked\n");
exit (0);
}
[EMAIL PROTECTED]:/tmp 56 % cc -o stack stack.c -xarch=amd64
[EMAIL PROTECTED]:/tmp 57% limit
cputime unlimited
filesize unlimited
datasize unlimited
stacksize 10240 kbytes
coredumpsize unlimited
descriptors 256
memorysize unlimited
[EMAIL PROTECTED]:/tmp 58% ./stack 10240
allocating 10240 k...Segmentation Fault (core dumped)
[EMAIL PROTECTED]:/tmp 59% ./stack 10236
allocating 10236 k...Segmentation Fault (core dumped)
[EMAIL PROTECTED]:/tmp 60% ./stack 10230
allocating 10230 k...worked
[EMAIL PROTECTED]:/tmp 61%
So things are a little approximate. Let's try raising
the limits:
[EMAIL PROTECTED]:/tmp 61% limit stacksize 20000
[EMAIL PROTECTED]:/tmp 62% ./stack 19990
allocating 19990 k...worked
[EMAIL PROTECTED]:/tmp 63%
Turns out the limit command doesn't display the actual
limit size above some pretty nominal values, but the
limit command seems to work up to 2GB or so.
[EMAIL PROTECTED]:/tmp 90% limit stacksize 2000000
[EMAIL PROTECTED]:/tmp 91% ./stack 1999990
allocating 1999990 k...worked
[EMAIL PROTECTED]:/tmp 92%
- Bart
--
Bart Smaalders Solaris Kernel Performance
[EMAIL PROTECTED] http://blogs.sun.com/barts
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code