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

[REBOL] Re: A collection of garbage

From: cyphre:seznam:cz at: 10-Jul-2003 9:04

Hi Carl, Frank and all,
> ----- Original Message ----- > From: "Frank Sievertsen" <[fsievert--uos--de]> > To: <[rebol-list--rebol--com]>; <[carl--rebol--com]> > Sent: Wednesday, July 09, 2003 10:22 AM > Subject: [REBOL] Re: A collection of garbage > > ...... > > Turn recycler off to see both working. You can see the same problem > with do/next and reduce. > > Frank > ...... >
What about this? Just try it to paste into console with and without commented "recycle/off" line: -----------------begginning of code------------------- address?: function [ {get the address of a string} s [any-string!] ] [address] [ s: make struct! [s [string!]] reduce [s] address: make struct! [i [integer!]] none change third address third s address/i ] get-mem?: function [ {get the byte from a memory address} address [integer!] /nts {a null-terminated string} /part {a binary with a specified length} length [integer!] ] [m] [ address: make struct! [i [integer!]] reduce [address] if nts [ m: make struct! [s [string!]] none change third m third address return m/s ] if part [ m: head insert/dup copy [] [. [char!]] length m: make struct! compose/deep [bin [struct! (reduce [m])]] none change third m third address return to string! third m/bin ] m: make struct! [c [struct! [chr [char!]]]] none change third m third address m/c/chr ] img: make image! 512x512 ;recycle/off ;Warning! should allocate about 200MB of memory but don't crash loop 4 [ get-mem?/part address? img length? img ] ----------------------------------end of code --------------------------------- Looks like there are still problems with the GC?? regards, Cyphre