Re: memory usage

Liste des GroupesRevenir à cl tcl 
Sujet : Re: memory usage
De : rich (at) *nospam* example.invalid (Rich)
Groupes : comp.lang.tcl
Date : 08. Aug 2024, 21:27:58
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v939oe$7pr3$1@dont-email.me>
References : 1
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
saito <saitology9@gmail.com> wrote:
Sorry this may be quite basic but just wanted to confirm it:
 
Let's say that I have a proc which generates a large dict and returns
it. Then when used, the caller assigns it to a variable.
 
How much memory is used, 10mb or 20mb? (let's ignore any extra memory
needed to manage the dict structure and the proc calls).
 
 
proc generate_10mb_dict {a b c} {
 # generate a large dict, in d
 
 return $d
}
 
set my_data [generate_10mb_dict $a $b $c]
 
 
what is the ram use at this point?

Given your sample code, the usage is the amount taken up by the dict.

If the dict is 10mb (as you suggest) then after "set my_data" the ram
usage is 10mb.

Date Sujet#  Auteur
8 Aug 24 * memory usage5saito
8 Aug 24 `* Re: memory usage4Rich
9 Aug 24  `* Re: memory usage3saito
9 Aug 24   `* Re: memory usage2Harald Oehlmann
9 Aug 24    `- Re: memory usage1saito

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal