Re: YAP Memory

View: New views
4 Messages — Rating Filter:   Alert me  

Re: YAP Memory

by Tony Wilson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

One thing I have found strange is that when you use '-s' to adjust
'stack space', the value supplied is reported against 'program space'
AND 'stack space' in the Cygwin version. Windows Task Manager reports
the same Page File Usage in both MinGW and Cygwin, so I suspect that
this is a reporting issue and not an allocation problem. The 'program
space' figure does not vary if the stack growth is through normal
overflow/expansion.

Regards,
Tony
Durban, South Africa

Cygwin ==================================================================

t@7pdx0h80srooz1k ~/cygYap
$ ./yap.exe -g statistics,halt
YAP version Yap-5.1.3
memory (total)        3170300 bytes
   program space      2228224 bytes:    2101280 in use,       126944 free
                                                                   0  max
   stack space         811008 bytes:       5072 in use,       805936 free
     global stack:                         4592 in use,         6340  max
      local stack:                          480 in use,         1796  max
   trail stack         131068 bytes:         36 in use,       131032 free

       0.000 sec. for 0 code, 0 stack, and 0 trail space overflows
       0.000 sec. for 0 garbage collections which collected 0 bytes
       0.015 sec. for 3 atom garbage collections which collected 2414 bytes
       0.469 sec. runtime
       0.469 sec. cputime
       1.500 sec. elapsed time

% YAP execution halted

t@7pdx0h80srooz1k ~/cygYap
$ ./yap.exe -s 20000 -g statistics,halt
YAP version Yap-5.1.3
memory (total)       42491900 bytes
   program space     21889024 bytes:   21762080 in use,       126944 free
                                                                   0  max
   stack space       20471808 bytes:       5072 in use,     20466736 free
     global stack:                         4592 in use,         6340  max
      local stack:                          480 in use,         1796  max
   trail stack         131068 bytes:         36 in use,       131032 free

       0.000 sec. for 0 code, 0 stack, and 0 trail space overflows
       0.000 sec. for 0 garbage collections which collected 0 bytes
       0.000 sec. for 3 atom garbage collections which collected 2414 bytes
       0.360 sec. runtime
       0.360 sec. cputime
       0.505 sec. elapsed time

% YAP execution halted

t@7pdx0h80srooz1k ~/cygYap
$ ./yap.exe -s 100000 -g statistics,halt
YAP version Yap-5.1.3
memory (total)      206331900 bytes
   program space    103809024 bytes:  103682080 in use,       126944 free
                                                                   0  max
   stack space      102391808 bytes:       5108 in use,    102386700 free
     global stack:                         4628 in use,         6340  max
      local stack:                          480 in use,         1796  max
   trail stack         131068 bytes:         36 in use,       131032 free

       0.000 sec. for 0 code, 0 stack, and 0 trail space overflows
       0.000 sec. for 0 garbage collections which collected 0 bytes
       0.000 sec. for 3 atom garbage collections which collected 2414 bytes
       0.438 sec. runtime
       0.438 sec. cputime
       0.523 sec. elapsed time

% YAP execution halted

MinGW ===================================================================

t@7pdx0h80srooz1k ~/minYap
$ ./yap.exe -g statistics,halt
% Restoring file C:\cygwin\home\t\minYap\startup
YAP version Yap-5.1.3
memory (total)        2220028 bytes
   program space      1245184 bytes:    1127328 in use,       117856 free
                                                                   0  max
   stack space         843776 bytes:       5072 in use,       838704 free
     global stack:                         4592 in use,         4648  max
      local stack:                          480 in use,          632  max
   trail stack         131068 bytes:         36 in use,       131032 free

       0.000 sec. for 0 code, 0 stack, and 0 trail space overflows
       0.000 sec. for 0 garbage collections which collected 0 bytes
       0.000 sec. for 0 atom garbage collections which collected 0 bytes
       0.031 sec. runtime
       0.031 sec. cputime
       0.000 sec. elapsed time

% YAP execution halted

t@7pdx0h80srooz1k ~/minYap
$ ./yap.exe -s 20000 -g statistics,halt
% Restoring file C:\cygwin\home\t\minYap\startup
YAP version Yap-5.1.3
memory (total)       21880828 bytes
   program space      1245184 bytes:    1127328 in use,       117856 free
                                                                   0  max
   stack space       20504576 bytes:       5072 in use,     20499504 free
     global stack:                         4592 in use,         4648  max
      local stack:                          480 in use,          632  max
   trail stack         131068 bytes:         36 in use,       131032 free

       0.000 sec. for 0 code, 0 stack, and 0 trail space overflows
       0.000 sec. for 0 garbage collections which collected 0 bytes
       0.000 sec. for 0 atom garbage collections which collected 0 bytes
       0.015 sec. runtime
       0.015 sec. cputime
       0.015 sec. elapsed time

% YAP execution halted

t@7pdx0h80srooz1k ~/minYap
$ ./yap.exe -s 100000 -g statistics,halt
% Restoring file C:\cygwin\home\t\minYap\startup
YAP version Yap-5.1.3
memory (total)      103800828 bytes
   program space      1245184 bytes:    1127328 in use,       117856 free
                                                                   0  max
   stack space      102424576 bytes:       5084 in use,    102419492 free
     global stack:                         4604 in use,         4648  max
      local stack:                          480 in use,          632  max
   trail stack         131068 bytes:         36 in use,       131032 free

       0.000 sec. for 0 code, 0 stack, and 0 trail space overflows
       0.000 sec. for 0 garbage collections which collected 0 bytes
       0.000 sec. for 0 atom garbage collections which collected 0 bytes
       0.015 sec. runtime
       0.015 sec. cputime
       0.000 sec. elapsed time

% YAP execution halted


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: YAP Memory

by Vitor Santos Costa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Tony

MingW YAP allocates stack memory from WIN32 throgh  the VirtualAlloc
family of functions, cygwin works with malloc/realloc. Given the
trouble people are having with cygwin, maybe it will make sense to try
if I can make cygwin work with VirtualAlloc code. It should, it still
is a WIN32 application. Though a werid one :)

Cheers

Vitor

On Thu, Jan 15, 2009 at 7:04 PM, Tony Wilson <soduktile@...> wrote:

> One thing I have found strange is that when you use '-s' to adjust
> 'stack space', the value supplied is reported against 'program space'
> AND 'stack space' in the Cygwin version. Windows Task Manager reports
> the same Page File Usage in both MinGW and Cygwin, so I suspect that
> this is a reporting issue and not an allocation problem. The 'program
> space' figure does not vary if the stack growth is through normal
> overflow/expansion.
>
> Regards,
> Tony
> Durban, South Africa
>
> Cygwin ==================================================================
>
> t@7pdx0h80srooz1k ~/cygYap
> $ ./yap.exe -g statistics,halt
> YAP version Yap-5.1.3
> memory (total)        3170300 bytes
>   program space      2228224 bytes:    2101280 in use,       126944 free
>                                                                   0  max
>   stack space         811008 bytes:       5072 in use,       805936 free
>     global stack:                         4592 in use,         6340  max
>      local stack:                          480 in use,         1796  max
>   trail stack         131068 bytes:         36 in use,       131032 free
>
>       0.000 sec. for 0 code, 0 stack, and 0 trail space overflows
>       0.000 sec. for 0 garbage collections which collected 0 bytes
>       0.015 sec. for 3 atom garbage collections which collected 2414 bytes
>       0.469 sec. runtime
>       0.469 sec. cputime
>       1.500 sec. elapsed time
>
> % YAP execution halted
>
> t@7pdx0h80srooz1k ~/cygYap
> $ ./yap.exe -s 20000 -g statistics,halt
> YAP version Yap-5.1.3
> memory (total)       42491900 bytes
>   program space     21889024 bytes:   21762080 in use,       126944 free
>                                                                   0  max
>   stack space       20471808 bytes:       5072 in use,     20466736 free
>     global stack:                         4592 in use,         6340  max
>      local stack:                          480 in use,         1796  max
>   trail stack         131068 bytes:         36 in use,       131032 free
>
>       0.000 sec. for 0 code, 0 stack, and 0 trail space overflows
>       0.000 sec. for 0 garbage collections which collected 0 bytes
>       0.000 sec. for 3 atom garbage collections which collected 2414 bytes
>       0.360 sec. runtime
>       0.360 sec. cputime
>       0.505 sec. elapsed time
>
> % YAP execution halted
>
> t@7pdx0h80srooz1k ~/cygYap
> $ ./yap.exe -s 100000 -g statistics,halt
> YAP version Yap-5.1.3
> memory (total)      206331900 bytes
>   program space    103809024 bytes:  103682080 in use,       126944 free
>                                                                   0  max
>   stack space      102391808 bytes:       5108 in use,    102386700 free
>     global stack:                         4628 in use,         6340  max
>      local stack:                          480 in use,         1796  max
>   trail stack         131068 bytes:         36 in use,       131032 free
>
>       0.000 sec. for 0 code, 0 stack, and 0 trail space overflows
>       0.000 sec. for 0 garbage collections which collected 0 bytes
>       0.000 sec. for 3 atom garbage collections which collected 2414 bytes
>       0.438 sec. runtime
>       0.438 sec. cputime
>       0.523 sec. elapsed time
>
> % YAP execution halted
>
> MinGW ===================================================================
>
> t@7pdx0h80srooz1k ~/minYap
> $ ./yap.exe -g statistics,halt
> % Restoring file C:\cygwin\home\t\minYap\startup
> YAP version Yap-5.1.3
> memory (total)        2220028 bytes
>   program space      1245184 bytes:    1127328 in use,       117856 free
>                                                                   0  max
>   stack space         843776 bytes:       5072 in use,       838704 free
>     global stack:                         4592 in use,         4648  max
>      local stack:                          480 in use,          632  max
>   trail stack         131068 bytes:         36 in use,       131032 free
>
>       0.000 sec. for 0 code, 0 stack, and 0 trail space overflows
>       0.000 sec. for 0 garbage collections which collected 0 bytes
>       0.000 sec. for 0 atom garbage collections which collected 0 bytes
>       0.031 sec. runtime
>       0.031 sec. cputime
>       0.000 sec. elapsed time
>
> % YAP execution halted
>
> t@7pdx0h80srooz1k ~/minYap
> $ ./yap.exe -s 20000 -g statistics,halt
> % Restoring file C:\cygwin\home\t\minYap\startup
> YAP version Yap-5.1.3
> memory (total)       21880828 bytes
>   program space      1245184 bytes:    1127328 in use,       117856 free
>                                                                   0  max
>   stack space       20504576 bytes:       5072 in use,     20499504 free
>     global stack:                         4592 in use,         4648  max
>      local stack:                          480 in use,          632  max
>   trail stack         131068 bytes:         36 in use,       131032 free
>
>       0.000 sec. for 0 code, 0 stack, and 0 trail space overflows
>       0.000 sec. for 0 garbage collections which collected 0 bytes
>       0.000 sec. for 0 atom garbage collections which collected 0 bytes
>       0.015 sec. runtime
>       0.015 sec. cputime
>       0.015 sec. elapsed time
>
> % YAP execution halted
>
> t@7pdx0h80srooz1k ~/minYap
> $ ./yap.exe -s 100000 -g statistics,halt
> % Restoring file C:\cygwin\home\t\minYap\startup
> YAP version Yap-5.1.3
> memory (total)      103800828 bytes
>   program space      1245184 bytes:    1127328 in use,       117856 free
>                                                                   0  max
>   stack space      102424576 bytes:       5084 in use,    102419492 free
>     global stack:                         4604 in use,         4648  max
>      local stack:                          480 in use,          632  max
>   trail stack         131068 bytes:         36 in use,       131032 free
>
>       0.000 sec. for 0 code, 0 stack, and 0 trail space overflows
>       0.000 sec. for 0 garbage collections which collected 0 bytes
>       0.000 sec. for 0 atom garbage collections which collected 0 bytes
>       0.015 sec. runtime
>       0.015 sec. cputime
>       0.000 sec. elapsed time
>
> % YAP execution halted
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Yap-users mailing list
> Yap-users@...
> https://lists.sourceforge.net/lists/listinfo/yap-users
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: YAP Memory

by Tony Wilson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think you should  just ignore win32 - I've been running some tests
on cyg, min and linux in a virtualbox on windows and the linux is
faster even with the extra overhead. The io in cyg and min seems to be
the biggest problem. I'm tabulating results and will post later. I
quite like VirtualAlloc - I have a home grown interpreter that
allocates a huge virtual area commits a few pages and them commits
more when getting faults - no accounting necessary. Tony

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: YAP Memory

by VĂ­tor Santos Costa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I would like to, but a few people still don't like installing Linux  
emulation on WIN32 :)

Thanks for the comments on VirtualAlloc!

Cheers

Vitor

On Jan 16, 2009, at 12:29 AM, Tony Wilson wrote:

> I think you should  just ignore win32 - I've been running some tests
> on cyg, min and linux in a virtualbox on windows and the linux is
> faster even with the extra overhead. The io in cyg and min seems to be
> the biggest problem. I'm tabulating results and will post later. I
> quite like VirtualAlloc - I have a home grown interpreter that
> allocates a huge virtual area commits a few pages and them commits
> more when getting faults - no accounting necessary. Tony


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users