amiga.org
     
iconAll times are GMT -6. The time now is 06:40 PM. | Welcome to Forum, please register to access all of our features.

» Amiga.org » Operating System Specific Discussions » Amiga OS » Amiga OS -- Development » Dealing with critical out of memory situations, interaction with auto stack enlargement app ?

Amiga OS -- Development This particular forum deals with issues regarding development for all versions of AmigaOS.

Reply
 
Thread Tools Display Modes
Old 03-07-2006, 04:27 PM   #1
Jose
Kindred of Babble-on
Points: 21,917, Level: 92 Points: 21,917, Level: 92 Points: 21,917, Level: 92
Activity: 10% Activity: 10% Activity: 10%
 
Join Date: Feb 2002
Posts: 2,786
Default Dealing with critical out of memory situations, interaction with auto stack enlargement app ?

Hi. Most normall programs would probably display a message saying out of memory, sorry dude can't continue, but...
In what I'm trying to do I want the program to be able to have some memory reserves, wich actually is already done. However there still is is a remote possibility of an out of memory not due to a failed allocation with AllocMem/AllocVec but due to excessive recursion. Most likely, this would be an extreme and rare situation and I even have some code there to avoid it somehow (the user can define a maximum amount of recursion for some routines) this is still not perfect so I want to know:
Is it possible for my code to interact with automatic stack enlargement patches available for 3.x or the OS code itself on AOS4/MOS so that it knows when the limit is reached ? Or it's just prone to crash in that situation ?

__________________
\"We made Amiga, they {bleep}ed it up\"
Jose is offline   Reply With Quote
Old 03-07-2006, 07:17 PM   #2
SamuraiCrow
Premium Member
Points: 13,276, Level: 75 Points: 13,276, Level: 75 Points: 13,276, Level: 75
Activity: 2% Activity: 2% Activity: 2%
 
SamuraiCrow's Avatar
 
Join Date: Feb 2002
Location: South Dakota, USA
Posts: 2,018
Blog Entries: 2
Send a message via Yahoo to SamuraiCrow Send a message via Skype™ to SamuraiCrow
Default Re: Dealing with critical out of memory situations, interaction with auto stack enlargement app ?

Of the languages I know that allocate their own stacks (namely AmosPro and AmigaE) each limits the recursion of all procedure calls and probably regulate them with an unnamed global variable to keep track of how many calls are nested.

Stack enlargement utilities are still a kludge not supported directly by any version of the AmigaOS and I think you stumbled onto one reason why.
SamuraiCrow is offline   Reply With Quote
Old 03-10-2006, 12:43 PM   #3
Jose
Kindred of Babble-on
Points: 21,917, Level: 92 Points: 21,917, Level: 92 Points: 21,917, Level: 92
Activity: 10% Activity: 10% Activity: 10%
 
Join Date: Feb 2002
Posts: 2,786
Default Re: Dealing with critical out of memory situations, interaction with auto stack enlargement app ?

I'll just stick with the code I have then.. It's already out of "normall" apps to have limitation on recursion I guess so it's not that bad.

How do Windows and Mac platforms handler this BTW ?
__________________
\"We made Amiga, they {bleep}ed it up\"
Jose is offline   Reply With Quote
Reply

Bookmarks

Tags
interaction , stack , situations , memory , enlargement , dealing , critical , auto , app

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
1st ever dealing with AmigaKit... save2600 Amiga Marketplace 11 02-28-2009 02:20 AM
Not bad for a semi-auto X-ray CH / General 18 04-12-2007 10:54 AM
Dealing with one's own mortality. NoFastMem CH / Philosophy and Religion 63 10-18-2005 10:38 AM
Functions with variable nr. of parameters Dealing with +1 argument.... Jose Amiga OS -- Development 3 09-06-2005 09:40 AM
Oh ! No ! Yet Another Microbloat Critical Update ! tony23 Amiga Software Issues and Discussion 34 09-13-2003 10:34 AM