Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #79248
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c++, comp.lang.c |
| Subject | Re: Text editor project in C |
| Date | 2021-04-24 22:59 -0700 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <s630fu$11vm$1@gioia.aioe.org> (permalink) |
| References | (4 earlier) <s5vamh$jcp$1@dont-email.me> <s5vb7o$u6v$3@gioia.aioe.org> <0RHgI.24742$b27.3309@fx03.iad> <s5vi21$1pn6$2@gioia.aioe.org> <mLXgI.37524$Qf2.15498@fx38.iad> |
Cross-posted to 2 groups.
On 4/24/2021 9:33 AM, Scott Lurndal wrote:
> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
>> On 4/23/2021 3:27 PM, Scott Lurndal wrote:
>>> "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> writes:
>>>> On 4/23/2021 1:29 PM, jacobnavia wrote:
>>>>> Le 23/04/2021 à 21:45, Chris M. Thomasson a écrit :
>>>>>> On 4/23/2021 2:25 AM, jacobnavia wrote:
>>>>>>> Le 23/04/2021 à 09:55, Juha Nieminen a écrit :
>>>>>>>> (I also love how the program has one malloc() and no corresponding
>>>>>>>> free(), because why would it. It's not like it matters by the end
>>>>>>>> of the program...)
>>>>>>>
>>>>>>> If you look a bit longer, maybe you find out why, but maybe not,
>>>>>>> depends on how far you can look.
>>>>>>
>>>>>> for (;;)
>>>>>> {
>>>>>> struct node* = malloc(sizeof(*node));
>>>>>> }
>>>>>>
>>>>>> Hey man, like, don't worry... The GC is there to save us! ;^o
>>>>>
>>>>> The malloc allocates the working area of the editor. It is not freed
>>>>> because it will be always needed; it is realloc'ed when needed, and
>>>>> freed by the OS when the program terminates. This is abvious for anyone
>>>>> reading C.
>>>>>
>>>>
>>>> Have you ever had to work with non-paged memory before?
>>>
>>> Ironically, the program in question was "run on non-paged memory",
>>> i.e. a PDP-11.
>>>
>>
>> The problems I had with non-paged memory was back when I was creating
>> server software back in WinNT 4.0. Every IOCP operation that's inflight
>> would use non-paged memory. So, using too much would foobar the system.
>
> Cutler "borrowed" most of the NT I/O and Memory subsystems from
> VMS (the VAX operating system). Which had the same issues with
> the non-paged pool.
>
Yeah. It was scary, in a sense. The problem rose its ugly head when to
many IOCP requests were in flight at the same time. The non-paged pool
could get nuked. I definitely had timeout logic to abort a certain class
of connections during times of stress. If a connection is allowed to
persist with no activity forever, it is still there, using up non-paged
memory. So, I would abort them based on timeouts, kind of a "its been
ten minutes, are you still there?" type of thing. I would cancel all of
the timeout pending connections when the server went into a certian
"panic" mode.
Way back, I even created a version that spawned clients, and forced them
to make a shitload of connections, and transfer huge files back and
forth, like ping pong. For each established connection the server would
store the current number of connections, along with other system data,
into a file. The system was allowed to crash. Reboot, and the file was
read... System crash at this many connections. So, this gave me a bit of
an insight into how many connections the system could handle before it
eats shit.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Text editor project in C jacobnavia <jacob@jacob.remcomp.fr> - 2021-04-22 18:58 +0200
Re: Text editor project in C Bonita Montero <Bonita.Montero@gmail.com> - 2021-04-22 19:05 +0200
Re: Text editor project in C wij <wyniijj@gmail.com> - 2021-04-22 12:41 -0700
Re: Text editor project in C Juha Nieminen <nospam@thanks.invalid> - 2021-04-23 07:38 +0000
Re: Text editor project in C wij <wyniijj@gmail.com> - 2021-04-23 05:12 -0700
Re: Text editor project in C red floyd <myob@its.invalid> - 2021-04-23 09:24 -0700
Re: Text editor project in C James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-04-23 16:59 -0400
Re: Text editor project in C wij <wyniijj@gmail.com> - 2021-04-23 21:43 -0700
Re: Text editor project in C Ian Collins <ian-news@hotmail.com> - 2021-04-24 17:05 +1200
Re: Text editor project in C wij <wyniijj@gmail.com> - 2021-04-24 00:50 -0700
Re: Text editor project in C "daniel...@gmail.com" <danielaparker@gmail.com> - 2021-04-24 08:50 -0700
Re: Text editor project in C wij <wyniijj@gmail.com> - 2021-04-24 10:41 -0700
Re: Text editor project in C Öö Tiib <ootiib@hot.ee> - 2021-04-25 06:19 -0700
Re: Text editor project in C wij <wyniijj@gmail.com> - 2021-04-25 10:23 -0700
Re: Text editor project in C Öö Tiib <ootiib@hot.ee> - 2021-04-25 12:46 -0700
Re: Text editor project in C wij <wyniijj@gmail.com> - 2021-04-25 20:34 -0700
Re: Text editor project in C Öö Tiib <ootiib@hot.ee> - 2021-04-28 09:57 -0700
Re: Text editor project in C wij <wyniijj@gmail.com> - 2021-04-29 10:56 -0700
Re: Text editor project in C jacobnavia <jacob@jacob.remcomp.fr> - 2021-04-27 18:31 +0200
Re: Text editor project in C David Brown <david.brown@hesbynett.no> - 2021-04-28 09:01 +0200
Re: Text editor project in C Manfred <noname@add.invalid> - 2021-04-28 14:54 +0200
Re: Text editor project in C Juha Nieminen <nospam@thanks.invalid> - 2021-04-29 04:47 +0000
Re: Text editor project in C Paavo Helde <myfirstname@osa.pri.ee> - 2021-04-29 11:42 +0300
Re: Text editor project in C Christian Gollwitzer <auriocus@gmx.de> - 2021-04-29 23:04 +0200
Re: Text editor project in C Juha Nieminen <nospam@thanks.invalid> - 2021-04-23 07:55 +0000
Re: Text editor project in C jacobnavia <jacob@jacob.remcomp.fr> - 2021-04-23 11:25 +0200
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-23 12:45 -0700
Re: Text editor project in C jacobnavia <jacob@jacob.remcomp.fr> - 2021-04-23 22:29 +0200
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-23 13:34 -0700
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-23 13:37 -0700
Re: Text editor project in C jacobnavia <jacob@jacob.remcomp.fr> - 2021-04-23 22:40 +0200
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-23 13:51 -0700
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-23 13:55 -0700
Re: Text editor project in C jacobnavia <jacob@jacob.remcomp.fr> - 2021-04-23 23:02 +0200
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-23 14:13 -0700
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-23 15:39 -0700
Re: Text editor project in C Bart <bc@freeuk.com> - 2021-04-24 01:20 +0100
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-23 17:43 -0700
Re: Text editor project in C kegs@provalid.com (Kent Dickey) - 2021-04-25 00:04 -0500
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-24 22:29 -0700
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-24 23:05 -0700
Re: Text editor project in C Paavo Helde <myfirstname@osa.pri.ee> - 2021-04-25 10:57 +0300
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-25 01:18 -0700
Re: Text editor project in C Paavo Helde <myfirstname@osa.pri.ee> - 2021-04-25 11:28 +0300
Re: Text editor project in C James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-04-25 15:02 -0400
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-26 01:25 -0700
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-26 01:26 -0700
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-23 14:15 -0700
Re: Text editor project in C scott@slp53.sl.home (Scott Lurndal) - 2021-04-23 22:25 +0000
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-23 15:31 -0700
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-23 13:38 -0700
Re: Text editor project in C scott@slp53.sl.home (Scott Lurndal) - 2021-04-23 22:27 +0000
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-23 15:34 -0700
Re: Text editor project in C scott@slp53.sl.home (Scott Lurndal) - 2021-04-24 16:33 +0000
Re: Text editor project in C "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-04-24 22:59 -0700
Re: Text editor project in C Juha Nieminen <nospam@thanks.invalid> - 2021-04-26 05:22 +0000
Re: Text editor project in C jacobnavia <jacob@jacob.remcomp.fr> - 2021-04-26 10:00 +0200
Re: Text editor project in C Juha Nieminen <nospam@thanks.invalid> - 2021-04-26 09:57 +0000
Re: Text editor project in C Robert Latest <boblatest@yahoo.com> - 2021-04-26 10:41 +0000
Re: Text editor project in C jacobnavia <jacob@jacob.remcomp.fr> - 2021-04-26 13:20 +0200
Re: Text editor project in C Juha Nieminen <nospam@thanks.invalid> - 2021-04-26 13:17 +0000
Re: Text editor project in C jacobnavia <jacob@jacob.remcomp.fr> - 2021-04-26 19:53 +0200
Re: Text editor project in C David Brown <david.brown@hesbynett.no> - 2021-04-26 20:34 +0200
Re: Text editor project in C jacobnavia <jacob@jacob.remcomp.fr> - 2021-04-26 22:49 +0200
Re: Text editor project in C David Brown <david.brown@hesbynett.no> - 2021-04-27 10:59 +0200
Re: Text editor project in C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-26 22:04 +0100
Re: Text editor project in C Eli the Bearded <*@eli.users.panix.com> - 2021-04-26 22:19 +0000
Re: Text editor project in C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-04-26 16:07 -0700
Re: Text editor project in C Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2021-04-26 17:08 -0600
Re: Text editor project in C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-04-26 16:57 -0700
Re: Text editor project in C Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2021-04-26 21:42 -0600
Re: Text editor project in C Kaz Kylheku <563-365-8930@kylheku.com> - 2021-04-27 00:46 +0000
Re: Text editor project in C Juha Nieminen <nospam@thanks.invalid> - 2021-04-27 04:51 +0000
Re: Text editor project in C Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2021-04-27 10:03 -0600
Re: Text editor project in C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-04-27 09:20 -0700
Re: Text editor project in C scott@slp53.sl.home (Scott Lurndal) - 2021-04-27 16:34 +0000
Re: Text editor project in C Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2021-04-27 10:55 -0600
Re: Text editor project in C Kaz Kylheku <563-365-8930@kylheku.com> - 2021-04-27 17:13 +0000
Re: Text editor project in C Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2021-04-27 17:28 +0000
Re: Text editor project in C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-04-27 13:33 -0700
Re: Text editor project in C scott@slp53.sl.home (Scott Lurndal) - 2021-04-27 19:27 +0000
Re: Text editor project in C Kaz Kylheku <563-365-8930@kylheku.com> - 2021-04-27 17:11 +0000
Re: Text editor project in C scott@slp53.sl.home (Scott Lurndal) - 2021-04-27 14:28 +0000
Re: Text editor project in C Juha Nieminen <nospam@thanks.invalid> - 2021-04-27 15:11 +0000
Re: Text editor project in C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-26 21:37 +0100
Re: Text editor project in C jacobnavia <jacob@jacob.remcomp.fr> - 2021-04-26 22:48 +0200
Re: Text editor project in C scott@slp53.sl.home (Scott Lurndal) - 2021-04-26 21:53 +0000
Re: Text editor project in C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-04-27 01:34 +0100
Re: Text editor project in C Guillaume <message@bottle.org> - 2021-04-26 18:48 +0200
Re: Text editor project in C James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-04-26 13:54 -0400
Re: Text editor project in C Jorgen Grahn <grahn+nntp@snipabacken.se> - 2021-04-23 20:00 +0000
Re: Text editor project in C Juha Nieminen <nospam@thanks.invalid> - 2021-04-26 05:29 +0000
Re: Text editor project in C om@iki.fi (Otto J. Makela) - 2021-04-23 19:25 +0300
Re: Text editor project in C wij <wyniijj@gmail.com> - 2021-04-24 10:55 -0700
Re: Text editor project in C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-04-24 14:21 -0700
Re: Text editor project in C Bonita Montero <Bonita.Montero@gmail.com> - 2021-04-26 18:04 +0200
csiph-web