<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Sorry again I forgot to include <A href="mailto:email@example.com">firstname.lastname@example.org</A></DIV>
<DIV>Thank you very much for your explanation, even though I don't understand 100%.</DIV>
<DIV>Here are some of my naive questions for you.</DIV>
<DIV>1. Since many PC has more than 1G memory, why can metapost use them all? Is there any specific reason to restrict 800,000 for metapost?</DIV>
<DIV>2. Is there anyway just store one picture, and rotate the same picture in different location instead of storing all the pictures in every different location? In this case, store one picture and location storage would be needed. Or is this too dumb question?</DIV>
<DIV>Thank you again for your detailed description. I'll have to study more about PC memory, stuff</DIV>
<DIV>Steve<BR><BR>--- On <B>Sun, 2/8/09, Taco Hoekwater <I><email@example.com></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Taco Hoekwater <firstname.lastname@example.org><BR>Subject: Re: [metapost] ! MetaPost capacity exceeded<BR>To: email@example.com<BR>Cc: "Karl Berry" <firstname.lastname@example.org>, email@example.com<BR>Date: Sunday, February 8, 2009, 2:47 AM<BR><BR><PRE>Hi Steve,
Steve MC Han wrote:
> Hi Karl,
> Thank you for your response.
> It's just a simple recursion drawing.
> If you change froct(5) in picture 3, then the capacity is exceeded 800000
already, which is strange because 8^5 is only 32768, even though
The problem is not your basic programming logic, it just uses much
more memory than you think it does.
Each of the octagons has eight points, that are eight memory words a
piece, and the graphic object it is attached to is another nine words.
That makes each of the octagons worth a whopping seventy-three words.
(usage numbers are for mpost 1.110, yours could be a little different)
At the return from the iteration in froct(4), just the current picture
is therefore worth 341.640 memory words already. But so is the
picture variable h (still), there is some content left in h0, and the next
thing you do it to copy currentpicture to h3. That means over 1M
is occupied just for the froct(4) iteration.
froct(5) will need 8 times that, so some 9MB in total would be
needed to complete that iteration.
> this looks more efficient to me, but in this case, it cannot even perform
4 iterations. So, obviously, it is less efficient than the original one.
Copying pictures means you need the memory twice. Metapost doesn't
know that you will clear one of them in the next iteration.