Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Items loaded in memory

Items loaded in memory

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Neves   USA  (78 posts)  Bio
Date Wed 11 Apr 2007 04:43 AM (UTC)
Message
I've noticed that the SMAUG lib loads things into memory, like areas, helpfiles, etc. I am wondering why does it do this, to save memory upon later request? If i was to change this would it cause increased lag?

-Mark
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #1 on Wed 11 Apr 2007 04:57 AM (UTC)
Message
What would you change it to do?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #2 on Wed 11 Apr 2007 08:02 AM (UTC)
Message
Areas are referenced almost all the time, it is hard to imagine a better way of storing them than in memory.

Conceivably you could load help data on request, however as a player somewhere is likely to be getting help on something fairly frequently, opening a file and reading it in, every few seconds, is likely to be a lot slower.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #3 on Wed 11 Apr 2007 08:13 AM (UTC)
Message
A running copy of SMAUG uses relatively little memory especially with respect to the massive amounts of memory available these days. My game, which is quite large, only uses 60mb. Let the OS take care of swapping memory out if needed.

I agree with Nick, the hit you will take by constantly referring to disk is going to be much slower. Just let the OS take care of swapping out unused memory and bringing it in when needed.

Memory management tricks are more important when you have a data set of, set, a gigabyte, and you absolutely must have the minimum possible in RAM because you have so much of it.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


13,636 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.