Re: > fails. Because heaps are unlimited whilst stacks are not.

Liste des GroupesRevenir à l c 
Sujet : Re: > fails. Because heaps are unlimited whilst stacks are not.
De : fir (at) *nospam* grunge.pl (fir)
Groupes : comp.lang.c
Date : 20. Mar 2024, 19:49:35
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <utf7je$2god8$1@i2pn2.org>
References : 1 2 3
User-Agent : Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
fir wrote:
bart wrote:
>
Maybe the routine is never called. Or it's called once then never called
again but the stack is now committed.
>
>
as far as i know it is not commited..im not 100 procent sure (as it
would probably need to use soem tool that shows that, maybe there are
some) but probably what i think is rught
>
windows will swap unused pages away from ram and it work in runtime
i mean if you declare 300 MB stack use it once and then for an hour you
use only 2 MB of this the 298 MB of physical ram will nt be "taken"
>
it is not hard to do it in system i think just as aplication acces ram
thry some table you may monitor once a time which regions are alocated
and non used and "detatch " phisical ram ftom thsi area - then attach it
if there is an acces -0 where this detach and attach is not very slow
operation
>
thats how i see it..i readed something about this but not much and long
time ago
im quite convinced at last that it worx for static arrays so it also should work for stack ..this is difference process explorer shows as
"private bytes" and "working set"
for example my aplication shows it uses 230 MB of "private bytes"
(this is becouse i used lot of statc arrays for various files in code
that sum up to 230 MB and it shows it uses 3MB of "working set"
- which i understand as real attached physical ram it uses
i hope im not wrong though im not totally sure as i not readed a lot on this
this is also why im not sure if i should use more heap (reallock) based),
more stack, or more static - static should be faster and if the cost os only that "private bytes" wit show high value im not sure if this is nor erasonable cost (becouse heap based in present c is not so much nice)

Date Sujet#  Auteur
20 Mar 24 * > fails. Because heaps are unlimited whilst stacks are not.12fir
20 Mar 24 +* Re: > fails. Because heaps are unlimited whilst stacks are not.4fir
20 Mar 24 i`* Re: > fails. Because heaps are unlimited whilst stacks are not.3fir
20 Mar 24 i `* Re: > fails. Because heaps are unlimited whilst stacks are not.2fir
20 Mar 24 i  `- Re: > fails. Because heaps are unlimited whilst stacks are not.1fir
20 Mar 24 `* Re: > fails. Because heaps are unlimited whilst stacks are not.7bart
20 Mar 24  +* Re: > fails. Because heaps are unlimited whilst stacks are not.4fir
20 Mar 24  i`* Re: > fails. Because heaps are unlimited whilst stacks are not.3fir
20 Mar 24  i +- Re: > fails. Because heaps are unlimited whilst stacks are not.1fir
20 Mar 24  i `- Re: > fails. Because heaps are unlimited whilst stacks are not.1fir
20 Mar 24  `* Re: > fails. Because heaps are unlimited whilst stacks are not.2fir
20 Mar 24   `- Re: > fails. Because heaps are unlimited whilst stacks are not.1fir

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal