![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| decreasing the MAXSSIZE value ! | ghadad | UNIX for Advanced & Expert Users | 1 | 01-11-2006 07:29 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Help with maxssize
Hi,
I read up about maxssiz when having problems with stack overflow. I check on the below on my HP-UX as: Parameter Current Dyn Planned Module Version =============================================================================== maxssiz 0x17000000 - 0X17000000 When using gdb, i check that the value for a local array variable is as follows: (gdb) print &s[1000000] $2 = 0x690e7a50 "c" Does this imply that the memory address is within the max allocated? Also, how do i interpret the address in dec, again the maxssiz value in dec? Any help is really appreciated. Thanks |
|
||||
|
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! |
|
||||
|
I'm not sure what kind your OS is, but if it is Linux:
Instead of adjusting kernel settings, try looking at the output of ulimit -s. And see what that says. You probably have a code error. If you really are blowing the stack - which I doubt - try using heap instead of stack. In other words make the array a global array, not on the stack. You can do this two ways by: 1. declaring it global or 2. using malloc to create the storage for the array Changing kernel parameters is the last and worst choice - what if you want to run the code on another machine? |
|
||||
|
Variables declared "outside" a function, global variables, are not on the stack. malloc does allocate memory in heap. To see how you code allocates memory now, use the size command. I think Code:
size -f myprog will work on your system. Anyway consult the manpage |
![]() |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|