|
raddevus wrote: My point is that a single process cannot just consume all memory on a box, right? I already mentioned this... It's only available memory not already claimed. It's first come, first serve. So, assuming you're 64-bit and have less than 8TB memory then it can consume all the remaining available memory. Just like disks though, memory should never be "full" or else you'll run into problems.
raddevus wrote: It's limited to some address space size, I'm guessing. Obermd posted the limits. My reply was about how memory works, so between the two of these you should know the limits.
raddevus wrote: But, maybe I'm wrong, maybe a process can consume all 128GB of ram?? Again, the OS will use some. Some graphics cards may also use some. Your app will never have access to that. It's available memory it can consume. I took time to write that reply, please go through it.
raddevus wrote: I think it cannot becuase it would be quite easy for a malicious process to crash other processes and the OS if this were true. Nobody ever said otherwise. You asked if it could, all of us said no and I gave a detailed explanation of why not.
raddevus wrote: When a process gets memory from heap (for newing up objects) it gets it from its own address space. When that memory is gone then you get "out of memory" but doesn't mean you ate all the memory on the box. Again, I already talked about protected/virtual memory. Did you read my reply?
Jeremy Falcon
|
|
|
|
|
Oh, I read. I was just confused.
It often takes me a long while to understand things.
I'm a very slow developer. I've worked in IT for > 33 years & dev around 25 but I'm still honestly slow.
Just takes me a while to understand concepts.
That's it. Thanks for your help. I'll read it again.
|
|
|
|
|
Thanks for the honesty buddy. We all have our thing. Like my biggest weakness is impatience (some might say being a douche ).
Jeremy Falcon
|
|
|
|
|
1 2 and 3 are true of 32-bit processes. I don't think it's true of 64 bit processes.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Yeah, I'm very curious if a process can allocate memory beyond 3-4GB size.
I saw a thing that made it look like it could :
384 GB or system commit limit, whichever is smaller Windows 8.1 and Windows Server 2012 R2: 15.5 TB or system commit limit, whichever is smaller.
But that seems terribly dangerous. But what do I know.
Also, interested in what "system commit limit" is and if that is still set to 3-4GB on 64 bit processes.
|
|
|
|
|
System commit limit sounds like it might be the amount of dirty memory it can write to the swap, or maybe that it can use as swap? Not sure, but I'm more inclined to think it's the former rather than the latter, if any.
Edit: I'm surprised it wouldn't be expressed in pages rather than GB though.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Step away from the misbehaving application for a moment. Fire up a VM running the Windows OS you want, and write a bad, evil application. It does not have to be complex. Using a VM allows you to crash/hang it instead of your main box. Try malloc (comes off the heap) and static allocation (process space?). I'm rusty. Just play around.
That said, trust nothing Microsoft "documents." I fully confess that I am jaded. Trust but verify.
I have had my left leg in the embedded world and the right leg on the desktop. My two common errors has been buffer overflows into malloc'd areas and stack overflows. Either way, it's an application issue.
Keep learning.
Charlie Gilley
βThey who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.β BF, 1759
Has never been more appropriate.
|
|
|
|
|
I need to amend my earlier statement about 32-bit processes under Windows.
While it's not important, historically the process address space was divvied such that the lower 2GB was "user space" and the upper 2GB was "kernel space" (I may have that backward, but either way, it's half and half)
Some apps could be "3GB aware", sometimes run with a command line switch like /3GB to enable it. In that case, the kernel was only mapped to 1GB of the address space. I'm not sure why all apps weren't this way, other than compatibility. An example of a 32 process that could be 3GB aware with a command line switch is the old 32-bit versions of Image Line's FL Studio DAW software.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
For Linux and friends, start with man getrlimit and apropos oom . The whole OOM-killer environment is intriguing, to say the least. I believe it came from the *nix legacy of lots of users timesharing a machine with limited resources, particularly memory. A competitive, rather than cooperative, workload.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
raddevus wrote: So when a developer notices that the app he wrote running on
Presumably this is your real question and seems like it was already answered.
However one somewhat related gotcha with C# (if relevant) is the Large Object Heap. Which means an app can "run out" of memory long before physical/virtual memory is used.
|
|
|
|
|
jschell wrote: C# (if relevant) is the Large Object Heap. Which means an app can "run out" of memory long before physical/virtual memory is used.
Both of the Apps (Services) in question are indeed written in C# and the point you make is highly relevant and I really appreciate you mentioning it. Very helpful.
My question really hasn't been answered.
I am still very curious if a 64 bit app can eat all of the memory on a large server (64GB RAM or something larger).
I'm guessing that it cannot since
1. I believe that any app cannot allocate RAM beyond its address space.
2. This would be a huge security hole since any malicious app could just eat all RAM
Someone mentioned a "leak" but even a leak is bound to the processes address space & once the process has eaten / leaked all that RAM then it would throw the "out of memory" exception.
I'm just not sure if the OS allows address spaces to be much larger than 4GB and if it does what the "default" value would be for each address space on 64 bit Windows OS (Server).
Very difficult thing to find.
I would write an app that eats all the RAM -- and have done that, but the box I have is limited to 8GB or even 16GB and you need more RAM and running the Win Server OS to really determine this.
|
|
|
|
|
Wordle 1,189 4/6
π©β¬β¬π¨β¬
π©β¬π©β¬π©
π©β¬π©π©π©
π©π©π©π©π©
|
|
|
|
|
Wordle 1,189 4/6*
β¬β¬β¬β¬π©
β¬β¬β¬π¨π©
π©β¬β¬β¬π©
π©π©π©π©π©
|
|
|
|
|
Wordle 1,189 3/6
β¬π¨β¬π¨π©
π©β¬π©β¬π©
π©π©π©π©π©
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Wordle 1,189 5/6*
β¬β¬π©π¨π©
π©β¬π©β¬π©
π©β¬π©β¬π©
π©β¬π©β¬π©
π©π©π©π©π©
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
β¬β¬β¬β¬π©
β¬β¬π©β¬π¨
β¬β¬π©π¨π©
π©β¬π©β¬π©
π©π©π©π©π©
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 1,189 3/6*
β¬β¬π¨β¬β¬
π¨π¨β¬β¬π¨
π©π©π©π©π©
Happiness will never come to those who fail to appreciate what they already have. -Anon
And those who were seen dancing were thought to be insane by those who could not hear the music. -Frederick Nietzsche
|
|
|
|
|
Wordle 1,189 4/6
β¬β¬π©β¬π©
π©β¬π©β¬π©
π©β¬π©π©π©
π©π©π©π©π©
Ok, I have had my coffee, so you can all come out now!
|
|
|
|
|
Wordle 1,189 4/6*
β¬β¬π©β¬π©
π©β¬π©β¬π©
π©β¬π©π©π©
π©π©π©π©π©
|
|
|
|
|
Wordle 1,189 3/6
β¬β¬π©β¬π©
π©β¬π©β¬π©
π©π©π©π©π©
Within you lies the power for good - Use it!
|
|
|
|
|
I'm the kind of stuck that doesn't resolve itself to a programming question.
As an adult I used to work with someone I taught coding to back when we were teens, and we'd buddy code, and accomplish things neither one of us could do on our own. We worked really well together.
Eventually he went off to NYC to make obscene amounts of money.
But that's the kind of help I need. This SVG stuff is absolutely kicking my ass.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
honey the codewitch wrote: off to NYC to make obscene amounts of money
Sorry, can't help you there.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
|
Quote: [...] obscene amounts of money.
honey the codewitch wrote: [...] that's the kind of help I need. Me too.
On the serious side, I strongly doubt the magician would happen again.
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
Get a rubber duck*?
* Made a typo there once, made for an interesting conversation
|
|
|
|