Sponsored Content
Full Discussion: Help with maxssize
Top Forums UNIX for Advanced & Expert Users Help with maxssize Post 302181796 by karthikb23 on Friday 4th of April 2008 06:56:20 AM
Old 04-04-2008
Hi,
I basically want to ensure that the above message is because of a stack overflow.

On checking maxssiz using sysdef, i get a value: 0-98048.

This is beleive is the value from 0 - The frame base, to 98048.
Also, a kmtune gives me:

Parameter Current Dyn Planned Module Version
===============================================================================
maxssiz 0x17000000 - 0X17000000

I haven't used kmtune before. Does 0X17000000 imply the upper limit of stack address???

So, I wanted to check the value of stack in the core file.

On Sun, this can be done using pmap.
But i cannot find an equivalent command on HP.

And was fiddling around with GDB, to check if i could find some way around with this, on GDB.

Can anyone help please?

Thanks!
 

We Also Found This Discussion For You

1. UNIX for Advanced & Expert Users

decreasing the MAXSSIZE value !

Decreasing the MAXSSIZE(kernel param) from 300MB to 100MB resolved the problem of memory lack ( can't allocate memory ) . how come ??? Thanks Golan (1 Reply)
Discussion started by: ghadad
1 Replies
PTHREAD_ATTR_GETGUARDSIZE(3)				   BSD Library Functions Manual 			      PTHREAD_ATTR_GETGUARDSIZE(3)

NAME
pthread_attr_getguardsize -- get and set thread guard size LIBRARY
POSIX Threads Library (libpthread, -lpthread) SYNOPSIS
#include <pthread.h> int pthread_attr_getguardsize(const pthread_attr_t * restrict attr, size_t * restrict guardsize); int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize); DESCRIPTION
The pthread_attr_getguardsize() and pthread_attr_setguardsize() functions get and set guardsize in the attr object. If guardsize is larger than 0, the system reserves an additional region of guarded memory of at least guardsize bytes at the end of the thread's stack for each new thread created by using attr. The guarded area is understood to be pages of memory that are protected from read and write access. While the guarded area should be rounded by the system page size, the actual default size is implementation-defined. In NetBSD the default guardsize is _SC_PAGESIZE, the system page size. The rationale behind guardsize is two-fold: 1. On the one hand, it provides protection against overflow of the stack pointer. If there is a guard area and a thread overflows its stack pointer into this extra memory area, it should receive a SIGSEGV signal or experience other comparable fatal error condition. Note that if a thread allocates large data structures on stack, it may be necessary to raise the default guardsize in order to detect stack overflows. 2. On the other hand, the overflow protection may waste system resources if an application that creates a large number of threads knows that it will never overflow the stack. In this case it is possible to set guardsize to 0. If pthread_attr_setstack(3) or pthread_attr_setstackaddr(3) is used to set the stack address attribute in attr, the guard size attribute is ignored and no guard area will be allocated; it is the responsibility of the application to handle the overflow conditions. RETURN VALUES
If successful, both functions return 0. Otherwise, an error number is returned to indicate the error. ERRORS
No errors are defined for pthread_attr_getguardsize(). The pthread_attr_setguardsize() may fail if: [ENOMEM] There was insufficient memory. SEE ALSO
pthread_attr(3), pthread_attr_setstack(3), sysconf(3) STANDARDS
Both functions conform to IEEE Std 1003.1-2008 (``POSIX.1''). BSD
July 7, 2010 BSD
All times are GMT -4. The time now is 03:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy