I realised that there is no warning to the overflow of convoi IDs. When I tried to buy 8193rd convoi (under the default setting i.e. convoys = 8192), Simutrans just shut down. It would be good if there is a warning message, if you tried to buy 8193rd convoi...
Quote from: yoshi on March 22, 2009, 11:22:39 AM
Simutrans just shut down.
So this is a bug => topic moved.
A map with 8192 convoys...... holy. cow. :D
EDIT: WAit.. wait... wait... A map with 8192 convoys - AND YOU STILL NEED MORE. Good grief! (I'm just amazed... hehehehe)
well, mazbe the default should be 32760 anyway ...
But a warning is possible. Same would go for just denz buzing a new one.
What about this one with the following sentence.... ::)
(http://www.postimage.org/Pq2u5ERA.jpg) (http://www.postimage.org/image.php?v=Pq2u5ERA)
Leave the convoys alone, now!!!
Edit: sentence modified.
Vilvoh, just so that you know: that could be easily interpreted as insulting (at least I can imagine that instantly).
How much memory does that value eat anyway? 8B per item when aligned?
Quote from: VS on March 23, 2009, 03:20:37 PM
How much memory does that value eat anyway? 8B per item when aligned?
4, i think. It's just a table of pointers, which is used to implement the "tombstone" pattern to have checkable pointers (checkable if the object in question still exists).
http://en.wikipedia.org/wiki/Tombstone_(programming)
Edit:
If someone ever wondered what "quickstones" are, that's been a modification of this pattern, which is supposed to be faster. No idea if this is still in the current Simutrans code, but it was when I left it.
Quickstones are indeed used heavily in the current Simutrans code.
THe new code will extend to 65530 and give a warning (and no new convoi) when handles are exceeded. Meaning the values will be gone from configuration files soon.
Oh, thank you very much for your prompt work!