Jump to content

Memory Woes

Recommended Posts

Howdy ho, Simon!


So, I'm building Prefabs for the AD&D (1st Edition) spells. I've got separate Prefabs for Clerics, Druid, and Magic-Users. There is quite a bit of overlap (the Magic-User Detect Magic spell is almost the same as the Druid Detect Magic Spell which is almost the same as the Cleric Detect Magic spell) so I am kind of flipping between the different Prefabs and copying stuff from one to the other. The Cleric prefab sucks up about 42MB out of the 64MB recommended (it's got about 100 spells in it, same as the druid, but the magic-users have about 200 spells and I'm worried about down the road especially). I'm constantly running in the high 50s and frequently getting Low Memory errors. I know that I shouldn't tinker with the memory setting unless absolutely necessary. So I'm wondering, do I tinker with the memory for a bit (lowering it back later) or do I split the files? I'd REALLY like to keep it in a single file but if this is going to be an ongoing problem maybe it's best to do it now. After all, I'll eventually be posting this entire mess for others to use and even with loading/unloading the prefab as necessary that's a lot of memory to be sucking up for a prefab.


Do prefabs take up less memory when Loaded (as opposed to open for editing)?


Thanks for the help.




EDIT: What about running two versions of HD simultaneously? That seems to get me around my immediate memory problem, but is this a good idea?

EDIT EDIT: Nevermind. Running two copies of HD doesn't allow me to copy an item from one instance to another. That's no help at all.

Share this post

Link to post
Share on other sites

All loaded prefabs have the same impact on memory as if they were part of the character.


Unless HD is giving you low/out of memory errors, don't worry about the meter -- there are a number of intricacies in how Java handles memory that you need to understand before paying much attention to that.


If you're getting low/out of memory errors from HD, first and foremost look to how many prefabs you have loaded (not just what you're actively working on). Unload those that you don't need. If that's not an option, then look to increase the amount of memory that you're giving to HD.

Share this post

Link to post
Share on other sites

Yeah, I keep a hairy eyeball on the meter but I don't panic until I start getting warnings. I lost about an hour's worth of work yesterday when it locked up after a memory warning (after an hour of waiting for the error box to actually paint completely I just killed the process) so I'm saving OFTEN now (as I should have been all along). I try to grab what I need and close the other prefab as much as possible.


I'll bump up the memory a bit and keep splitting the files as an option for later. 



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...