Quote:
Originally Posted by mazex
Good that we have normalized the situation then
No - that memory I'm talking about is just the RAM memory that the threads share and that is allocated to the process and it's subthreads by the OS. That memory is then divided into the stack (variables, structs etc - normally with short lifespan that is "cheap" and fast) and the heap (where objects etc are dynamically stored for a longer time and you allocate and deallocate that memory yourself (and it is slower than the stack)). This is all stored in RAM unless the OS decides to swap it to disk if it runs out of memory (but you are fine with your 12 GB  ). The fact that the CPU then uses registers (memory) etc is something a "normal" programmer never mess with in normal cases with modern programming languages....
If you did not like debugging straight single thread code you can imagine doing that in multi threaded code with eight threads messing with each other and you don't really know the state of that 109... Is it dead or alive? The CollisionAndResponse thread thinks it is not but the AIThread does not know that so can we call it the opposite of brain dead? 
|
Thank you for the responses Maze, I know my tone can be abrasive but I am not looking around to pick a fight here. The issue with the ram was I thought you were talking about the CPU cache (for example i7 uses two 4mb cache's, 4mb for 2 cores/4 threads). This is what I was trying to get at originaly, the conversation then nosedived, so from my view I was arguing about hardware allocation. But yes again I never said multi threaded programming was easy, just that it was necessary since clock speeds are not increasing like they used to.
Anyway thanks for the polite and well thought out responses, but be wary my eye in the sky is watching for you to make a minor grammatical error so I can wtf divebomb you and call you an old fart who programmed typewriters for 20 years