4 ms·
Leave that aside for a sec. Are you honestly saying that because it isn't easy to do this, the best course of action is to make it impossible by lying to the pr
by AnIdiotOnTheNet 4y ago
Leave that aside for a sec. Are you honestly saying that because it isn't easy to do this, the best course of action is to make it impossible by lying to the program?
- tinus_hn 4y agoIf it bothers you, you can just turn off overcommit. It’s not hard: $ sysctl vm.overcommit_memory=2 # policy number 2 $ sysctl vm.overcommit_ratio=0 # ratio = 0% So here’s your golden opportunity to show us how easy it is to program against that! I didn’t claim that it is not easy. I claimed that it is practically impossible. You claimed it was easy. So please, prove me wrong and just show us how easy it is.
- AnIdiotOnTheNet 4y agoThat's for the entire system though. If this behavior is default because programs suck at dealing with memory then that will definitely cause problems, right? That's why we're in this shitpickle to begin with. Obvious solution is obvious: opt in to no-overcommit behavior on a per-program basis and exempt programs that opt-in from being OOM killed. > I claimed that it is practically impossible. Suddenly it makes sense why modern software is such unreliable slow garbage. You don't by chance work for Microsoft on the Windows Terminal team do you? If this is so impossible, why would so many other OSs actually correctly not-lie to the program about memory allocation failure? > So here’s your golden opportunity to show us how easy it is to program against that! Alright, what would you like me to program for you for free and how long are you going to give me[0], because the vast majority of code I write doesn't even have to allocate at all. Even the stuff that does just does the obvious thing when it can't allocate what it needs: tell the user it can't allocate what it needs and exit as gracefully as possible. Even that is impossible on an OS that fucking lies to you. [0] No, I'm not going to actually do it. This whole tactic is predicated on the idea that it is more work than someone is willing to go through to prove a point on the internet, you know that, that's why you went there.
- tinus_hn 4y agoSo, to the surprise of really no-one, you claim programmers have ‘learned helplessness’ because they can’t apply your easy solutions, but back down on the ground when it’s time to demonstrate your superior abilities, it turns out to be all talk. You don’t need to go and write software for me, if your arguments are worth anything you would be able to demonstrate them using the software you already wrote as you gained the experience to back your handwaving claims. Clearly you didn’t do that (if you did you would have known your original claims were a bit shallow), you just show up on your high horse to talk down to others who do. All talk and no action.
- worthless-trash 4y agoHe has spoken.
- AnIdiotOnTheNet 4y agoOr to put it another way, the only way you are able to defend the ludicrous idea that an OS should be lying to programs about their allocations is to claim it is impossible and get all demanding and pissy to the first person who comes by to contradict you. Which is ridiculous, because plenty of programs will stop and tell you they have run out of memory for an operation. It's the easy way to handle allocation failure you're so hell bent on me showing you. Here's one: https://knowledge.ni.com/servlet/rtaImage?eid=ka03q0000012W23&feoid=00N0Z00000HEWRk&refid=0EM0Z000000phNh https://knowledge.ni.com/servlet/rtaImage?eid=ka03q0000012W2... You can do that kind of thing when the OS doesn't lie to you. Depending on circumstances you can do other things. But hell, even if you think that's stupid and I'm stupid for saying that this is better than crashing, I still can't fathom why you think the status quo on Linux is the best possible idea. Hey, I know, let's pretend we can't run out of disk space either and just randomly delete files when the disk starts to fill up.
- tinus_hn 4y agoI never said any of these things, I said it is practically impossible to deal with not getting memory when you need it, which you claim but can’t show is easy. And then there’s a whole lot of rambling about operating systems which has nothing to do with it. If you do one huge allocation and it fails, yes it’s easy to handle that. But programs do tons of small allocations all the time and it’s impossible to handle if that fails. Do you think you can even show that fancy pop-up when you can’t allocate memory?