13

Does Linux guarantee freeing malloc'd unfreed memory on program exit?

I feel like in clutches here... I'd say this question requires a minimum of 6 tags, but as we know, the max is 5!

Yes.. I wanted to know how things are on Linux. So I initially tagged my Q with these tags: . Then I thought was appropriate here as well, if not even almost necessary, but this would exceed the limit of 5 tags! So I had to choose a tag to remove and my choice was .

Then @zwol came and said:

When you're asking questions like this, about whether or not things that everyone expects to work a particular way are actually guaranteed to work that way by relevant standards, it helps to tag the question "language-lawyer". – zwol

I agree. This was my thinking as well. But which of the already existing tags should go? @Zwol edited my Q, removing both and and instead adding and . He said:

@gaazkam I think this question will come to the attention of more of the right people if you drop both "c" and "linux" and add "posix" and "language-lawyer" instead. It's not really a C question nor is it really specific to Linux. – zwol

OK I didn't object to this. On the first glance this made sense to me: even though I'm mainly interested in Linux atm, if this question is applicable to all POSIXish systems, it should be tagged instead. (Is it? I'm not knowledgeable enough to judge, I'd just trust what more competent people tell me in this regard).

But apparently this change made other people unhappy:

@gaazkam Based on the title, "Linux isn't 100% POSIX conformant..", and plus your comment, it looks like you're primarily interested in Linux and looking at man pages & POSIX spec to reinforce guarantees for the same. If this is not about Linux but solely about POSIX then edit the question as such (and the answer is simple "it's unspecified and no guarantees"). – usr

And also:

"language-lawyer" except it isn't linked to any programming language, just to an OS specification... – curiousguy

OK I'm dumbfounded right know. I honestly don't know how to tag my question. I'd now be most happy with putting all those tags in (, , , , , , ) but this of course would far exceed the 5 tags limit and even this besides I'm not sure if such tagging would be appropriate.

Any suggestions?

4
  • 8
    As your (well researched and written) question practically immediately attracted the attention of two high ranking field experts, I would definitely call this "mission accomplished", as it turned out just fine. If tuning the exact 'correct' tags is all they can find lacking, you should not be overly worried about it.
    – Jongware
    Commented Nov 24, 2018 at 11:36
  • 2
    I'd drop the language-lawyer tag. It's defined by the platform here, not the language, and I once saw a platform where it didn't work. (Yes, that's horrible.)
    – Joshua
    Commented Nov 26, 2018 at 4:33
  • Oh, I wish the maximum tag count was indeed 120... Commented Nov 26, 2018 at 11:23
  • "memory-management" may be a good addition as well. in replacing terminate. And i agree the language-lawyer doesn't serve any additional purpose.
    – T.S
    Commented Nov 27, 2018 at 10:54

1 Answer 1

19

Though I wouldn't lose much sleep about this (see usr2564301's comment), you can get one extra slot by dropping . It is a little used tag (as of now, 732 questions and one solitary watcher) that includes a jumble of disparate questions about things described as "termination". That being so, I would argue that having it isn't of much use.

1
  • 11
    Your obsv. re terminate makes me think we should – eh – terminate it. We already have exit, with synonyms such as [quit] and [halt].
    – Jongware
    Commented Nov 24, 2018 at 14:19

You must log in to answer this question.