newLISP Fan Club

Forum => newLISP and the O.S. => Topic started by: alex on July 19, 2006, 12:57:32 PM

Title: Error in (replace)?
Post by: alex on July 19, 2006, 12:57:32 PM
Microsoft Windows XP [Версия 5.1.2600]
(С) Корпорация Майкрософт, 1985-2001.

c:newlisp>newlisp
newLISP v.8.7.10 on Win32 MinGW, execute 'newlisp -h' for more info.

>  (replace "(.{1})" (dup "0" 500)  "1" 0)
"1111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111111111111111111111111
11111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111"
>  (replace "(.{1})" (dup "0" 500000000)  "1" 0)

c:newlisp>
Title:
Post by: Lutz on July 19, 2006, 01:56:33 PM
This is a problem of memory management in MS Windows. (dup "0" 500000000) will try to allocate a huge amount of memory.



A UNIX system will start swapping and perhaps run out of memory.



Lutz
Title:
Post by: alex on July 19, 2006, 09:01:03 PM
Thanks.

It is bad "new" for me :-(