[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Very small size limit of Gnu Prolog "database"?
From: |
Paulo Moura |
Subject: |
Re: Very small size limit of Gnu Prolog "database"? |
Date: |
Wed, 12 Dec 2012 12:07:07 +0000 |
Hi Mark,
Are you using a 32 bits or 64 bits build of GNU Prolog? I would expect that to
make a difference but is just a hint; I could be wrong.
Cheers,
Paulo
On 11/12/2012, at 18:49, Mark Roulo <address@hidden> wrote:
> I am exploring the size limits for GNU Prolog
> when used as a database. Right now I have
> a prolog file that contains 10,000 simple facts.
>
> It looks like this:
>
> is_a_widget('GUID:Widget-0000000').
> is_a_widget('GUID:Widget-0000001').
> is_a_widget('GUID:Widget-0000002').
> :
> :
> is_a_widget('GUID:Widget-0009995').
> is_a_widget('GUID:Widget-0009996').
> is_a_widget('GUID:Widget-0009997').
> is_a_widget('GUID:Widget-0009998').
> is_a_widget('GUID:Widget-0009999').
>
> The GNU Prolog compiler chokes when trying to compile it.
>
> xyzzy:Src kt$ gplc -o program blatz.pl
>
> Fatal Error: global stack overflow (size: 32768 Kb, reached: 32765 Kb,
> environment variable used: GLOBALSZ) compilation failed
>
> Increasing the GLOBALSZ variable to 300MB doesn't help:
>
> xyzzy:Src kt$ GLOBALSZ=327650; export GLOBALSZ; gplc -o program blatz.pl
>
> Fatal Error: global stack overflow (size: 327652 Kb, reached: 327649 Kb,
> environment variable used: GLOBALSZ) compilation failed
>
> Is 10,000 facts a *REAL* limit? Or am I doing something very wrong? Ideally
> I'd like to go to about 1,000,000 simple facts.
>
> I created my input prolog file with this C program:
>
> #include <stdio.h>
>
> int main(int argc, char *argv[])
> {
> FILE *fp = fopen(argv[1], "w");
>
> for (int i = 0; i < 10000; ++i)
> {
> fprintf(fp, "is_a_widget('GUID:Widget-%07d').\n", i);
> }
>
> fclose(fp);
>
> return 0;
> }
>
> Thanks,
> Mark Roulo
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/users-prolog
-----------------------------------------------------------------
Paulo Moura
Logtalk developer
Email: <mailto:address@hidden>
Web: <http://logtalk.org/>
-----------------------------------------------------------------