[comp.sys.mac.hypercard] Not Enough Memory to Sort???

GFX@PSUVM.BITNET (11/28/88)

I archive papers abstracts with Hypercard 1.0 on a Mac SE with 1 Meg.
The stack contains 1211 cards and takes approximately 1.6Meg of disk
space.  It sorted without problem at 1210 cards, but prompted me with
"Not enough ..." at 1211 cards.  I issued the same command again, and
this time it sorted successfully.  Can someone tell me how does Hypercard
uses memory to do sorts?  Am I about to be unable to sort anymore if the
stacks grows bigger (as it will for sure), or will I have to reissue the
command a couple of times?  Has the problem been solved in later releases?

Stephane

dan@Apple.COM (Dan Allen) (11/29/88)

In article <62912GFX@PSUVM> GFX@PSUVM.BITNET writes:
>I archive papers abstracts with Hypercard 1.0 on a Mac SE with 1 Meg.
>The stack contains 1211 cards and takes approximately 1.6Meg of disk
>space.  It sorted without problem at 1210 cards, but prompted me with
>"Not enough ..." at 1211 cards.  I issued the same command again, and
>this time it sorted successfully.  Can someone tell me how does Hypercard
>uses memory to do sorts?  Am I about to be unable to sort anymore if the
>stacks grows bigger (as it will for sure), or will I have to reissue the
>command a couple of times?  Has the problem been solved in later releases?

HyperCard allocates temporary memory for the keys to sort a stack.
There is a limit to how many cards can be sorted based on this temporary
memory.  It requires 8 bytes * the number of cards of temporary RAM.
(In the latest versions of HC, if you are running under MultiFinder
HyperCard will try to get temporary memory from MF for this: programmers
will know what this is about...)

Thus running on a 1 MB
Mac Plus without MF allows sorting a stack with about 6000 cards,
roughly.  (HyperCard in this state has about 50KB free which is about
6250 cards * 8 bytes...)

As to why the sort worked the second time?  There was probably time for
the stack's dirty cards to be written to disk, thus freeing up more RAM.
All of this is just approximate.

Dan Allen
Apple Computer