log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- RISCOSbits releases a new laptop solution (News:4)
- Announcing the TIB 2024 Advent Calendar (News:2)
- RISC OS London Show Report 2024 (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
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
ksattic
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
Rich
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 :)
________
RichGCheers,
Rich.
  ^[ Log in to reply ]
 
Phil Mellor Message #40645, posted by monkeyson2 at 09:55, 28/4/2003, in reply to message #40639
monkeyson2Please 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
ksattic
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