Listen to my story, folks. Yesterday I lost a C# programmer position due to the GC failure. My job was supporting a web service, which has code, allocating a huge chunk of memory, which persists, until the GC believe it need to free memory.
All wouldn't be that bad, but IIS provides a pool of concurrent processces (Application Pool), serving http-queries, where each process has own address space and a GC, unaware about the other processes. So each process may try to allocate whole computers's memory, before considering to garbage collect and release memory back to the system.
My decision was isolating the offending code into a separate process, which would do it's job, then die, immediately freeing the memory. Alas my boss disagreed with my decision, saying that I could have somehow hacked the vanilla dotNet GC into forcing it to free memory (GC.Collect doesn't guarantee anything and works only for objects having finalizers).
Name:
Anonymous2014-04-25 10:09
Moral: even the right decision may get you fired, when GC is involved.
So just forget about GC and allocate memory manually - that way you will be in control and your boss will be happy, because clients won't see the OutOfMemoryException, when they try to use the web service.
Name:
Anonymous2014-04-25 10:18
The simplest way GC can fail, is when it grabs all memory and then unmanaged code calls malloc, returning whooping NULL! (because malloc doesn't know about GC).
I feel we're missing part of the story here. No one would get fired over that, unless it was, like, the hundredth time it happened. Or you started screaming about how the Jews were doing to I sabotage you. Or he was already looking for a way to get rid of you because you've been being a cunt.
But anyway, hello Nikita, glad to see you. Did you ever kill and eat those children like you promised? How did your biology ``research'' turn out? Has that slut dumped you yet? Where are you going to blog now that vk is under Putin's control and Mossad shut w4ch down?
I feel we're missing part of the story here. No one would get fired over that, unless it was, like, the hundredth time it happened.
I asked my former boss, why I got fired, and he told it was because I failed to fix the GC problem on-time (moving code into separate process required a lot of work and inventing an IPC protocol).
Or he was already looking for a way to get rid of you because you've been being a cunt.
Possible too, I'm not a team-worker and have a direct approach to communication (i.e. I refuse to get "social cues"). Also, I love formality and specifications, while the boss promoted this agile programming shit, where you have to be active and have some initiative, which I believe is bad and leads to chaos.