One evening I was fiddling with RISC OS loading and unloading tasks. I had previously ascertained that the maximum number of tasks available under RISC OS 2.00 was 32. However, this time when I loaded several tasks I got a 'Too Many Windows' error long before I was out of Tasks. I realised that one application I was loading must be taking an inordinate number of Window Handles.
This program is designed to allow the number of free Window Handles to be counted. Using it you can both check up on what is available and check how many handles an application consumes.
2. Using WinCount
=================
2.1 Counting Free Windows
-------------------------
To check the number of free windows simply select count from the WinCount menu (click menu on the WinCount icon to bring this menu up). The result of the count appears in the 'Result' submenu. Before a count has been performed, the result will be '?'.
2.2 Checking an Application's Window Usage
------------------------------------------
Load WinCount and check the number of free Windows. Then load the application. Select count again and subtract the new Result from the old. This is the number of Window Handles used by the application.
2.3 Some Notes on Usage
-----------------------
If you load WinCount from the supervisor prompt when the desktop is not running you can count the number of windows available. Under RISC OS 2.00 you get 59. WinCount uses 1, giving 60 in total. I expect that the other 4 are used internally; 64 seems a likely number. This, incidentally allows for 2/task. This limit is presumably a trade-off between memory consumed (for 310, 400/1 owners) and handles available.
Some applications have been found by me to be particularly greedy. These are:
!C-Front 2.18 18-Nov-89 12 handles
!Spark 2.00 06-Sep-89 8 handles
!FormEd 1.01 23-May-89 8 handles
Note that all the acorn standard applications consume *very* few handles.
3. Program Information
======================
3.1 Version history
-------------------
Version 0.01 2nd June 1990
First Version
Quick 1 hour hack to check what took so many window handles.
Full Implementation.
Version 0.02 3rd June 1990
Fixed bug that made count 1 too low
3.2 Sharware information
------------------------
This package contains:
WinCount 0.02 (3rd June 1990): RISC OS application
The software contained in this package is Shareware. The word 'Shareware' means many things to many people, so I'll explain what I mean. In fact, some people would call this 'freeware' or 'public domain software' but it hardly matters what you call it - your obligations are set out below.
The program is free. You may make any number of copies and give them away to anyone (subject to the condition that you give them ALL the files in the package). You may not sell this software, or use it otherwise for personal gain without my permission. If you wish to post it on your Bulletin Board or include it in your Shareware library then that, too, is fine.
If you want to add any part of the code or data to one of your programs for your own use, then that's fine too. If you want to add it to something you plan to sell, or otherwise release as copyright material (whether for gain or not) then you'll need my permission - I retain copyright on this program.
If you like this program and find it useful then I would appreciate a small donation of, say, 5 pounds (since this is the result of quite a lot of work). This donation is a voluntary contribution.
If you send a donation and say which version of the package you have then I will send you an update if there is one. This disc will also contain up-to-date copies of as much of my shareware as will fit, plus any other stuff I can fit. There may be no update, since this program is nearing completion. Thus I don't guarantee that, if you send me money, I'll send you a new version of the program. You will, however, get a disc with things on it. If you'd prefer to wait until there is a disc with a new version on it then please say so. In this case you'll get a thankyou note.
This program has been tested with RISC OS 2.00. It is not suitable for Arthur 1.2.
This software carries no warranty, either express or implied. I've tested it and, to the best of my knowledge, there are no bugs. If you come across a bug then I'd be delighted if you got in touch with me. I can't guarantee to fix it but I'll probably have a good try.
My address is:
Martyn Lovell
16, Fairwater Park,
Barnwood,
Gloucester.
GL4 7HF
No telephone calls please.
However, I can be contacted as:
Cix: MartynL
UUCP: MartynL@cix.UUCP
UUCP: MartynL@cix.cix.co.uk (if the above won't work)
Janet: zceeb02@uk.ac.ucl.euclid
Janet: zceeb02@uk.ac.ucl.pyramid (after June 1st 1990)
Janet: MLovell@uk.ac.ucl.cs (preferred)
Interspan: Contact via Janet at above address
Archive BBS: Martyn Lovell (112)
Arcade BBS: Martyn Lovell (112)
Note that, during university terms, I read all this EMail sites regularly but
in the holiday periods I may read them less regularly.
For bug reports please send the following information: