Copy & Memory
[1/5] from: pwawood::mango::net::my at: 19-Dec-2004 17:09
Does Copy create a new underlying value or simply create a new pointer to
the existing value?
In either case is there a simple way of querying the system object to
manually monitor memory usage?
Thanks.
Peter
[2/5] from: volker::nitsch::gmail::com at: 19-Dec-2004 15:18
On Sun, 19 Dec 2004 17:09:06 +0800, PeterWAWood <[pwawood--mango--net--my]> wrote:
> Does Copy create a new underlying value or simply create a new pointer to
> the existing value?
The top-level of the series is copied. references point to the old
values (ie. inner blocks and strings are shared. integers and such
small things are copied.).
copy/deep copies also references, except of objects. objects are always shared.
> In either case is there a simple way of querying the system object to
> manually monitor memory usage?
>
system/stats ;)
> Thanks.
> Peter
<<quoted lines omitted: 5>>
> To unsubscribe from the list, just send an email to rebol-request
> at rebol.com with unsubscribe as the subject.
--
-Volker
Any problem in computer science can be solved with another layer of
indirection. But that usually will create another problem.
David
Wheeler
[3/5] from: hallvard:ystad:oops-as:no at: 19-Dec-2004 18:29
Hi Peter,
You _are_ aware of http://www.rebol.org/library/scripts-download/mem2.r, I hope?
do http://www.rebol.org/library/scripts-download/mem2.r
pool
mem-free
memphis
Hallvard
Dixit PeterWAWood (10.09 19.12.2004):
[4/5] from: pwawood:mango:my at: 20-Dec-2004 9:48
Hallvard
Thanks for pointing me in the right direction. I really should make better
use of the library.
Regards
Peter
[5/5] from: AJMartin::orcon::net::nz at: 22-Dec-2004 22:18
Peter wrote:
> Does Copy create a new underlying value or simply create a new pointer to
> the existing value?
copy creates a new value, Peter.
>> x1: "abcde"
== "abcde"
>> x2: copy x1
== "abcde"
>> insert tail x1 "extra"
== ""
>> x1
== "abcdeextra"
>> x2
== "abcde"
---
Andrew Martin
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted