Acorn Arcade forums: Programming: Increasing wimpslot when necessary
|
Increasing wimpslot when necessary |
|
ksattic (19:04 24/4/2003) rich (09:52 28/4/2003) monkeyson2 (09:55 28/4/2003) ksattic (15:18 28/4/2003)
|
|
Simon Wilson |
Message #40403, posted by ksattic at 19:04, 24/4/2003 |
Finally, an avatar!
Posts: 1291
|
How do I calculate the minimum initial wimpslot needed by an application? Trial and error?
If I'm writing a C++ program that has lots of objects flying around, what's the best way to dynamically increase and decrease the wimpslot* as required? Do I have to do a check on available memory every time I do a new or would it be possible to overload the new operator?
Cheers.
Edit: *Peter Naulls informs me that WimpSlot allocation is quite different to malloc or new allocation. Can anyone tell me what "WimpSlot allocation" is? AFAIK, the WimpSlot is a chunk of memory for use by the application. Using malloc or new will use memory in that WimpSlot. Is this correct?
[Edited by ksattic at 20:16, 24/4/2003] |
|
[ Log in to reply ] |
|
Richard Goodwin |
Message #40639, posted by rich at 09:52, 28/4/2003, in reply to message #40403 |
Dictator for life
Posts: 6828
|
I usually count up the size of all the files in the application, and use that as the ballpark figure. You find out how much memory is required to load the !RunImage, and you have things like sprite files, docs and so on that bumps the count up so there's room for variables and suchlike ________ Cheers, Rich.
|
|
[ Log in to reply ] |
|
Phil Mellor |
Message #40645, posted by monkeyson2 at 09:55, 28/4/2003, in reply to message #40639 |
Please don't let them make me be a monkey butler
Posts: 12380
|
Now if you're using the Acorncastlenorcroft tools, I'm sure there's a tool that calculates the code and data size for you. |
|
[ Log in to reply ] |
|
Simon Wilson |
Message #40747, posted by ksattic at 15:18, 28/4/2003, in reply to message #40639 |
Finally, an avatar!
Posts: 1291
|
I usually count up the size of all the files in the application, and use that as the ballpark figure. OK, this is how I've always been doing it, so at least I don't feel stupid now.
I don't have Norcroft because someone told me the C++ compiler isn't as good as the one with gcc.
Michael Foot (BeebIt) sent me some code showing me how to change the wimpslot. |
|
[ Log in to reply ] |
|
|
Acorn Arcade forums: Programming: Increasing wimpslot when necessary |