Post Reply 
How much memory may a HPPL program use on a G2?
09-04-2023, 08:22 AM (This post was last modified: 09-04-2023 09:57 AM by komame.)
Post: #6
RE: How much memory may a HPPL program use on a G2?
(09-03-2023 06:47 PM)Stefan Falk Wrote:  The program runs, on my HP Prime G2 with current firmware, fine for up to 11x11 queens, but fails with out of memory for 12x12 and above. For 12x12, there are a few hundred different solutions, and for each 8 variants are stored (original, turned 3 times, and each mirrored). That should be much less than 1000 elements, each a 12-element array of real numbers. I guess that should easily fit in main memory.

You simply exceeded the maximum number of entries for the list. In PPL, a list can contain only 10000 elements.

Add the following line to the end of the program:
Code:
TEXTOUT_P(STRING(SIZE(ALLSOLS)),0,60,3,BLACK,150,WHITE);

It displays the current size of the ALLSOLS list. You can see that for dimensions 9x9, the list contains 368 elements, for 10x10 => 736, for 11x11 => 2728, and for 12x12, it exceeds 10000, which results in an error report.

It's a pity that there's such a limit; unfortunately, it kills some algorithms or makes their implementation very challenging. The HP Prime has a lot of RAM, but these limitations make it very difficult to utilize it fully with a program. At the moment of reporting the error, the ALLSOLS list is only 1.91 MB in size, which is very little considering the available free RAM. These restrictions are entirely senseless.

Piotr Kowalewski
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How much memory may a HPPL program use on a G2? - komame - 09-04-2023 08:22 AM



User(s) browsing this thread: 1 Guest(s)