Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.linux > #70644

Re: "while(1);" borks Visual Studio.

From Soviet_Mario <SovietMario@CCCP.MIR>
Newsgroups alt.os.linux, comp.os.linux.misc, comp.os.linux.advocacy
Subject Re: "while(1);" borks Visual Studio.
Date 2021-08-16 16:06 +0200
Organization A noiseless patient Spider
Message-ID <sfdrdi$tf0$1@dont-email.me> (permalink)
References (3 earlier) <in9641Fqs4oU1@mid.individual.net> <sep7vb$1ovr$1@gioia.aioe.org> <inb9hnF9n7qU1@mid.individual.net> <Jeff-Relf.Me@Aug.8--6.11pm.Seattle.2021> <inbom2Fch90U1@mid.individual.net>

Cross-posted to 3 groups.

Show all headers | View raw


Il 09/08/21 06:19, rbowman ha scritto:
> On 08/08/2021 07:11 PM, Jeff-Relf.Me@. wrote:
>> Bowman:
>>> I'm not a power user of the VS editor but
>>> 35 years later it seems to lack the features of Brief.
>>
>> My macros & extensions to Visual Studio 2019:  
>> http://Jeff-Relf.Me/Macros.HTM
>>
>> In Visual Studio, I'm editing a small, recently opened 
>> text file.
>> AutoRecover is turned off.
>>
>> For that, it's consuming 1.8 gigabytes of RAM, and growing 
>> rapidly;
>> occasionally, it drops back down to "just" 1.2 gigabytes.
>>
>> Just now, it disappeared from the task manager altogether,
>> showing up again only after ReStarting the task manager.
>>
>> Every time I debug my app, memory usage goes up,
>> briefly topping 2 gigabytes, _after_ exiting the 
>> app/debugger.
>> Hmmm... it's a memory leak, apparently.
>>
>> I ReStarted Visual Studio, now it's consuming 186 megabytes,
>> no more memory leaking.
>>
>> "while(1);" borks Visual Studio, apparently.
>>
> 
> It would tend to do that. Even a more complex while 
> statement that doesn't have any natural points where it will 
> block will try for 100% of the cpu. At least now it only 
> ties up one core.

It is not selfevident to me why an infinite loop should be 
supposed to eat up RAM ...
CPU time maybe yes, but why high RAM consumption ?

Recursion of calls to procedures consumes RAM (even if on 
many compilers that don't let grow limitlessly automatic 
memory, but the stack has a maximum size and then the 
overflow kills badly the process : the stack overlaps and 
collide with read only data, with "code", with areas 
belonging to other processes, seg-faulting, etc).

To produce similar leaks, I think (I'm just saying an 
opinion, not a truth) some conditions might operate :

an infinite recursion of calls to procedures that have a 
very limited (or negligible) stack signature (i.g. no 
parameters passed, maybe not even a return value) and 
internally performing some heavy "dynamic allocation, i.g. 
by specialized constructors or else).

also routines that works on objects encapsulating arrays 
that assume to pass By Value (not by pointer or reference), 
when called in nested mode, will need to copy large amount 
of data, in dynamic ram.

Or even some mis-written or generated "destructors" that 
don't clean-up properly dynamically allocated objects (i.g. 
bad string allocators in programming manipulating a lot of 
rw strings). Or both.
A memory leak can have a lot of fathers and mothers. But, 
imho, not a simple infinite loop in itself.


If i think sth like this

String A = "";
while (1)
     A &= "x";

the memory usage would explode, sure, depending on the 
placement of the chained string A ....





-- 
1) Resistere, resistere, resistere.
2) Se tutti pagano le tasse, le tasse le pagano tutti
Soviet_Mario - (aka Gatto_Vizzato)

Back to alt.os.linux | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Any Unicode Experts? FR <fr@random.info> - 2021-08-06 14:39 +0000
  Re: Any Unicode Experts? FR <fr@random.info> - 2021-08-06 15:01 +0000
    Re: Any Unicode Experts? Snit Michael Glasser <frelwizzen@gmail.com> - 2021-08-06 08:10 -0700
  US-ASCII is a subset of the set of Unicode code points. Jeff-Relf.Me  @. - 2021-08-06 08:15 -0700
    Re: US-ASCII is a subset of the set of Unicode code points. "R.Wieser" <address@not.available> - 2021-08-06 17:36 +0200
      Re: US-ASCII is a subset of the set of Unicode code points. FR <fr@random.info> - 2021-08-06 15:49 +0000
        Re: US-ASCII is a subset of the set of Unicode code points. "R.Wieser" <address@not.available> - 2021-08-06 18:48 +0200
        Re: US-ASCII is a subset of the set of Unicode code points. FR <fr@random.info> - 2021-08-06 17:57 +0000
  Re: Any Unicode Experts? Eli the Bearded <*@eli.users.panix.com> - 2021-08-06 20:27 +0000
    Re: Any Unicode Experts? The Natural Philosopher <tnp@invalid.invalid> - 2021-08-07 09:36 +0100
      Re: Any Unicode Experts? Eli the Bearded <*@eli.users.panix.com> - 2021-08-08 04:32 +0000
        Re: Any Unicode Experts? rbowman <bowman@montana.com> - 2021-08-07 22:50 -0600
          Re: Any Unicode Experts? jak <nospam@please.ty> - 2021-08-08 20:32 +0200
            Re: Any Unicode Experts? rbowman <bowman@montana.com> - 2021-08-08 18:00 -0600
              "while(1);" borks Visual Studio. Jeff-Relf.Me  @. - 2021-08-08 18:11 -0700
                Re: "while(1);" borks Visual Studio. rbowman <bowman@montana.com> - 2021-08-08 22:19 -0600
                Re: "while(1);" borks Visual Studio. Ann Glaser <frelwizzen@gmail.com> - 2021-08-09 14:57 -0700
                Re: "while(1);" borks Visual Studio. Soviet_Mario <SovietMario@CCCP.MIR> - 2021-08-16 16:06 +0200
                Re: "while(1);" borks Visual Studio. HHI <frelwizzen@gmail.com> - 2021-08-17 11:42 -0700
                Re: "while(1);" borks Visual Studio. STALKING_TARGET_27 <frelwizzen@gmail.com> - 2021-08-19 16:20 -0700
                Re: "while(1);" borks Visual Studio. jak <nospam@please.ty> - 2021-08-10 18:02 +0200
                while(malloc(666)); Jeff-Relf.Me  @. - 2021-08-10 09:28 -0700
                Re: while(malloc(666)); jak <nospam@please.ty> - 2021-08-10 18:39 +0200
              Re: Any Unicode Experts? jak <nospam@please.ty> - 2021-08-09 07:28 +0200
                Re: Any Unicode Experts? rbowman <bowman@montana.com> - 2021-08-09 07:56 -0600
                Re: Any Unicode Experts? jak <nospam@please.ty> - 2021-08-10 10:33 +0200
                Re: Any Unicode Experts? The Natural Philosopher <tnp@invalid.invalid> - 2021-08-10 12:49 +0100
                Re: Any Unicode Experts? jak <nospam@please.ty> - 2021-08-10 15:26 +0200
                Re: Any Unicode Experts? vallor <vallor@cultnix.org> - 2021-08-10 13:43 +0000
                Re: Any Unicode Experts? rbowman <bowman@montana.com> - 2021-08-10 21:12 -0600
                Re: Any Unicode Experts? The Natural Philosopher <tnp@invalid.invalid> - 2021-08-11 12:25 +0100
                Re: Any Unicode Experts? Steve Carroll <frelwizzen@gmail.com> - 2021-08-12 09:54 -0700
                Re: Any Unicode Experts? Steve Carroll <frelwizzen@gmail.com> - 2021-08-14 10:58 -0700
                Re: Any Unicode Experts? Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2021-08-11 16:52 +0000
                Re: Any Unicode Experts? jak <nospam@please.ty> - 2021-08-11 20:19 +0200
                Re: Any Unicode Experts? Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2021-08-12 16:37 +0000
                Re: Any Unicode Experts? jak <nospam@please.ty> - 2021-08-12 20:32 +0200
                Re: Any Unicode Experts? rbowman <bowman@montana.com> - 2021-08-12 20:40 -0600
                Re: Any Unicode Experts? Steven Petruzzellis - fretwizen <frelwizzen@gmail.com> - 2021-08-14 11:14 -0700
                Re: Any Unicode Experts? Steven Carroll <frelwizzen@gmail.com> - 2021-08-15 05:19 -0700
                Re: Any Unicode Experts? STALKING_TARGET_79 <frelwizzen@gmail.com> - 2021-08-13 15:09 -0700
                Re: Any Unicode Experts? Andreas Kohlbach <ank@spamfence.net> - 2021-08-10 16:11 -0400
      Re: Any Unicode Experts? STALKING_TARGET_53 <frelwizzen@gmail.com> - 2021-08-08 14:40 -0700

csiph-web