On Mon, 17 Jul 2000, Sivakatirswami wrote:
> on 7/17/00 9:10 AM, [EMAIL PROTECTED] at
> [EMAIL PROTECTED] wrote:
>
> > Are you sure the destroyStack of that stack is false? I am not getting this
> > behaviour here. Make sure you are trying to load the stack using its short
> > name, not its file path (your script suggested perhaps you weren't using the
> > short name). It should still be in memory so my guess is that you haven't
> > refered to the stack correctly.
>
> OK I am embarrassed to say I had the destroyStack checked. . .I must have
> done than in my "early days" when just getting started and also I was
> calling the stack by its file name, not it's short name.
>
> This leads to two questions:
>
> The mainStacks property will tell us all loaded stacks still in memory,
> whether open or closed. . . .
>
> 1) Is there a way to query the memory manager to determine when we are
> getting "too close" to the edge of available RAM? This is of course only an
> issue where virtual memory is not on, but in the envisioned "MetaCard World"
> browser environment we envision, a user could continue his browsing through
> our "metacard cyberspace" and build up a large number of undestroyed stacks.
> So how to query the heap space and start destroying stacks when we reach
> some kind of theoretical limit?
Unfortunately this depends on the platform. Windows 95/98 uses the
regular file system, so you can just do a "dir" and get the free
space. On NT, you have to make a system call to find out how much
swap space remains. On Linux the file "/proc/meminfo" has this
information in it, and any normal user can read that file. On some
other UNIX systems, only setuid root programs can get this
information. Some OSs will notify the user when swap space is getting
low, some don't. But as a general rule, you should probably just not
be wasteful and then don't worry about it.
> 2) is the space available for undestroyed stacks in MC's heap space or only
> limited by available RAM?
Those are the same things except on MacOS when you disable MetaCard's
use of temporary memory.
> One could of course create a cache directory on the users hard drive and
> start saving stack there transparently, . . .but that is another story to be
> told later.
This is a good idea if you'll be downloading a lot of stuff, and
especially if you want to preserve information across sessions rather
than downloading a new copy each time.
Regards,
Scott
> Hinduism Today
>
> Sivakatirswami
> Editor's Assistant/Production Manager
> www.HinduismToday.com
> [EMAIL PROTECTED]
********************************************************
Scott Raney [EMAIL PROTECTED] http://www.metacard.com
MetaCard: You know, there's an easier way to do that...
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.