Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
116 user(s) are online (96 user(s) are browsing Forums)

Members: 1
Guests: 115

hotrod, more...

Support us!

Headlines

 
  Register To Post  

guard area hit
Just popping in
Just popping in


See User information
I'm guessing that when I get a DSI error that tells me the red zone is OK but "guard area hit," I probably shouldn't click "Ignore DSI errors."

What is that guard area, anyway? What "hits" it?

Go to top
Re: guard area hit
Quite a regular
Quite a regular


See User information
The stack is an area of memory reserved for dynamic allocations and function call return addresses. The program starts with the "stack pointer" at the top of that area, and it grows downwards (towards lower addresses). As the dynamically-used parts are released, the stack pointer moves back up again. Unlike in many other OSes, AmigaOS does not have the capability to expand the stack area once allocated. The best we can do is to swap to another new, bigger stack for critical parts of the code, then swap back again later.

The "guard area" is a set of four longwords at the bottom of the stack area. If the stack grows so much that it reaches the bottom four longwords (without actually overflowing the whole space), then you get that indication. It's just an indication, no more, and it is not the reason that the program stopped.

If the stack went further (into the "red zone"), then you would get the "Stack pointer is outside bounds" message.

You should not continue from a DSI in any case, unless you are desperate. You never know what has been corrupted by the errant program before it finally crashed.

cheers
tony
Go to top
Re: guard area hit
Home away from home
Home away from home


See User information
@kilaueabart,

The first thing to try next time you run the program that crashed this way is to increase the stack, either from it's icon or in the shell with the stack command.

If crashes still happen it could be because of a more serious bug in the program (recursion out of control, memeory trash , etc etc).


Go to top
Re: guard area hit
Just popping in
Just popping in


See User information
@tonyw

Not ignoring DSI sounds like good advice, and in most instances I shall follow it from now on.

But opening a file in PageStream Pro 5.0.5.8 gets a DSI almost every time. I'm afraid I'd have to quit using that much-needed program!

Meanwhile, following broadblues suggestion, I have increased its stack from 100000 to 1000000. Will try it shortly, with trepidation; isn't that a pretty big stack?

Go to top
Re: guard area hit
Just can't stay away
Just can't stay away


See User information
@kilaueabart

1000000 is a pretty big stack, but not overly so. It all depends on the type of program and the data it uses, what it does and how it is programmed. And compared to your total system memory, you probably won't have a problem using 1 MB more for a stack - if is helps you.

Of course a DSI is a sign of problems, and the advice to not continue after ignoring one is sound. But e.g. in the case with PageStream, you also have to consider if it makes something possible which otherwise you couldn't do. I would try ignoring the DSI, then save the document often and in several generations (i.e. not overwriting each time). If you can continue working, and end up getting your document done without worse crashes, the benefits have outweighed the risks. And you have minimized the risks by saving often - and of course by not running anything else important simultaneously.

After you're done, reboot the machine to get a fresh start for any other work.

Best regards,

Niels

Go to top
Re: guard area hit
Home away from home
Home away from home


See User information
@nbache

It depends on the program, if it’s a Linux program, there is a chance they use salloc() to allocate memory, allocate memory on stack, this might a problem on AmigaOS.
(it's mostly done on temporary buffers, stack is intended to be reused, so its already allocated and there for a lot faster, as well as you don't need to free it after use, it will be freed when the program exits the function.)
(in this case 1mb is nothing.)

Program that do allot of recursive functions can also easy run out of stack.

I think most programs, written by normal people will run just fine with default stack.

it might not always help to increase the stack as sub processes has their own stack.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project