RE: [Tcl-nap-users] Nap Memory Problem
Brought to you by:
dav480,
peter_turner
From: salah j. <s_...@ya...> - 2006-03-03 08:17:35
|
Thank You very much for your concern. I hav did the same test 8 % nap_info bytes 1348 1323435 9 % nap "result= get_gridascii('c:/red.asc')" ::NAP::6474-6474 10 % nap_info bytes 1312472 1323435 11 % unset result 12 % nap_info bytes 1348 1323435 13 % In this test the nap looks like it works perfectly. but again i checked wich84.exe proceess memory usage . the first reading was 12,000 k and after the second time i used the code a bove it was about 30,000 k and after 4 times it was a bout 85,000 k, also i checked memory page file i get almost the same result. Today i did also some test by allocating NAO objects and after several times the tclsh crashes. i will try to do the same test on other machines and i will see the result. Har...@cs... wrote: Hi Salah, The following is a log (using the unreleased version 6.0.0) of creating & freeing a 100 MB array. The task manager showed that wish.exe started at 9 MB, went up to 112 MB when the array was allocated & then decreased to 10 MB after the freeing. The 1st number produced by nap_info bytes shows the number of bytes used by NAOs returned to 2696 after the freeing. % nap_info bytes 2696 2696 40092 40146 % nap "a = reshape(9, {25 1024 1024})"; # create 100 MB array ::NAP::18-18 % nap_info bytes 104860544 104861500 72228 72884 % unset a % nap_info bytes 2696 104861500 72220 72884 Hope this helps, Harvey Harvey Davies, CSIRO Marine and Atmospheric Research, Private Bag No. 1, Aspendale 3195 E-mail: har...@cs... Office: 03 9239 4556 Mobile: 04 2241 7563 -----Original Message----- From: tcl...@li... [mailto:tcl...@li...] On Behalf Of salah jubeh Sent: Friday, 3 March 2006 12:14 To: tcl...@li... Subject: [Tcl-nap-users] Nap Memory Problem Hi Guys I am working with NAP to do some image processing. i am using a nap function "get_gridascii" to read arc grid ASCII files. the size of images ranges from 2 MB to 100 MB and the platform that i am using is WINXP. I faced a problem such that the TCL shell give me message can not allocate memory. after calling "get_gridascii" several times. I used windows task manager utility to trace the process memory usage I find that a little a mount is freed after destroying a NAO object, I did the same test on two PCs and i get the same result on two versions of TCL. This is how i am using get_gridascii nap "get_gridascii('red.ASC')"; ::NAP::16-16 i used ::NAP::16-16 in order to free the memory but the memory did not freed. also i did another test like that nap "red=get_gridascii('red.ASC')"; and i used set red "" also i used unset red to free memory but the memory did not freed. I checked this with another versions like 5.0.3 and 5.0.2 and i get the same result. finally i made this test with 4.0.1 i get a good result doing the same test ,The memory was freed BUT I tried to open an image a bout 80 MB. the TCL shell stop responding. this image i was able to create ANO Object out of it with NAP 5.0.5 but i could not do the same with NAP 4.0.1. i did this test a gain twice an i faild to creat NAO object. What is the cause of this problem , is it a bug . and how can i free the memory. Best Regard Eng. Salah Al Jubeh MCP,MCAD,MCSD Mobile:00306947192421 --------------------------------- Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze. --------------------------------- Yahoo! Mail Use Photomail to share photos without annoying attachments. --------------------------------- Brings words and photos together (easily) with PhotoMail - it's free and works with Yahoo! Mail. |