From: "John P. Linderman" <jpl.jpl@gmail.com>
To: David <david@kdbarto.org>
Cc: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] whereis command
Date: Sun, 24 Apr 2022 14:38:39 -0400 [thread overview]
Message-ID: <CAC0cEp_8=bJKw-vU-qh-pMsC_q1aJT+DtiEP6R9jDiCuuGZb1A@mail.gmail.com> (raw)
In-Reply-To: <1CE39A9F-A3B5-45E3-A48E-D70010BB51E1@kdbarto.org>
[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]
On Sun, Apr 24, 2022 at 12:35 PM David Barto <david@kdbarto.org> wrote:
>
>
> > On Apr 24, 2022, at 8:59 AM, ron minnich <rminnich@gmail.com> wrote:
> >
> > Thanks.
> >
> > I did find a newer-ish version and I always get a kick out of stuff like
> this:
> >
> > free_dirlist(&ls, ALL_DIRS);
> >
> > right before the call to exit ... an inappropriate response to an
> > inappropriate warning, I suppose
> >
> > I once had an intern ask me "but if you don't free memory before the
> > program exits, then it can never get used again, right?" :-)
> >
> > (and yes, I know, in the paleo era, that was in fact true)
> >
> > I'll go try to find that archive ...
> >
> > ron
> >
>
> At $WORK we have a standing rule that all memory must be freed before the
> program exits.
>
> This is to ensure that the rest of the program doesn’t have any memory
> leaks. ASAN, UBSAN,
> Valgrind and the rest are good and far from perfect for detection of
> problems.
>
> However making sure to free all memory before exit() does aid them in
> finding problems early.
>
> Some colleagues took an external sort routine I wrote and tried to turn it
into a subroutine in a larger system.
(Why they didn't just pipe input into the sort process I never understood).
I hadn't taken any care to free the memory it used (and it used a LOT of
memory),
so after it was invoked a few times, it ran out of space.
I try to be more careful now about keeping track of memory
(but that requires extra memory).
[-- Attachment #2: Type: text/html, Size: 2494 bytes --]
next prev parent reply other threads:[~2022-04-24 18:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-24 15:24 ron minnich
2022-04-24 15:48 ` arnold
2022-04-24 15:59 ` ron minnich
2022-04-24 16:31 ` David Barto
2022-04-24 18:38 ` John P. Linderman [this message]
2022-04-24 16:27 ` Diomidis Spinellis
2022-04-24 16:48 ` Clem Cole
2022-04-24 16:54 ` Clem Cole
2022-04-24 17:39 ` ron minnich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAC0cEp_8=bJKw-vU-qh-pMsC_q1aJT+DtiEP6R9jDiCuuGZb1A@mail.gmail.com' \
--to=jpl.jpl@gmail.com \
--cc=david@kdbarto.org \
--cc=tuhs@minnie.tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).