Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Please, help me finding the memory hole

 [1/3] from: gchillemi::aliceposta::it at: 4-Dec-2007 2:52


Hello, I have a little script which is able to halt Rebol on an "Append" with an "Out of Memory Error". I have used stats as suggested and Recycle was inserted on each loop iteration but with no success. The program stops on an append. Where could be the bug using the following figures ? Stats/Series returns this: [8613376 28435 8584434 22 485 334 16784917] Stats/Frames returns this: [2304 1381 923 923 15397] Stats/Recycle returns this: [917 25560384 5396 12065 67 -68432] Stats/Evals returns this: [367052664 153184187 76583927] Stats/pools returns this: 16 6912 1097 256 27 110808 32 4992 692 128 39 160056 48 31872 3188 128 249 1531848 64 679232 268 64 10613 43555752 80 4498176 54 64 70284 360416352 96 2312704 4 32 72272 222597760 112 802880 21 32 25090 90123280 128 205824 18 32 6432 26396928 144 68928 4 32 2154 9942864 160 3968 2 32 124 635872 176 320 79 32 10 56400 192 320 78 32 10 61520 208 224 41 32 7 46648 224 160 49 32 5 35880 240 192 58 32 6 46128 256 192 25 32 6 49200 512 800 201 16 50 410000 1024 368 18 8 46 377200 2048 64 9 8 8 131136 4096 208 132 4 52 852384 16 8612864 383 512 16822 137940400 16 2304 930 256 9 36936 1 139548672 20 1 0 0 Stats/Types returns this: end! 540 unset! 3745 error! 2 datatype! 1144 context! 0 native! 144 action! 126 routine! 0 op! 17 function! 684 object! 1573 struct! 0 library! 0 port! 134 any-type! 0 any-word! 0 any-function! 0 number! 0 series! 0 any-string! 0 any-block! 0 symbol! 2834 word! 54097 set-word! 5289 get-word! 444 lit-word! 871 refinement! 1284 none! 6208 logic! 299 integer! 5913 decimal! 42 money! 0 time! 6 date! 38 char! 256 pair! 882 event! 6 tuple! 458 bitset! 37 string! 8572227 issue! 9 binary! 15 file! 109 email! 7 url! 61 tag! 2 image! 76 block! 9608 paren! 677 path! 5359 set-path! 1677 lit-path! 0 hash! 0 list! 0 Giuseppe Chillemi

 [2/3] from: santilli::gabriele::gmail::com at: 4-Dec-2007 5:33


2007/12/4, Giuseppe Chillemi <gchillemi-aliceposta.it>:
> Hello, I have a little script which is able to halt Rebol on an "Append" > with an "Out of Memory Error".
Are you appending to a string? How long is the string? (Seems 8MB from the stats but I'd like you to confirm.) How much free memory do you actually have? Can you reproduce it with a simple script? Regards, Gabriele.

 [3/3] from: gchillemi::aliceposta::it at: 4-Dec-2007 10:57


> > Hello, I have a little script which is able to halt Rebol > on an "Append"
<<quoted lines omitted: 3>>
> free memory do you actually have? Can you reproduce it with a > simple script?
Gabriele, thanks, it seems I have found the bug ant it is script related. The program searches for news on a internet site. I was appending two nested temporary blocks without clearing them after the loops. First loop size was: "block1size = block1size + pagefounds" instead of block1size = pagesfounds Second loop size was: "block2size = block2size + block1size" instead of block2size = block1size Without clearing block1 and block2 after their use the memomy numbers become huge (about 180.000 items in block2) Now I am testing the script reading 2000++ pages with 15 news in each page (about 30.000 items) but I suppose there shoud be no problems. Then will come another script which will read the contend of those news. I suppose I'll have again a memory problem but then it will be real and I will not be able to solve it and I will have to change the script flushing data found on a temporary disk file. Giuseppe Chillemi

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted