Well, that suggests that you were not using memory correctly and so we'll tease apart today exactly what it means to navigate inside of a computer by way of memory and we'll also touch on over time what are some of the evils that might happen.
嗯,那表示你没有正确地使用内存,我们将详细讨论,怎样操纵计算机的内存,以后,我们还将提及,可能发生的有害的操作。
Almost everyone in this room has probably had a segfault at some point or core dump where you end up with this random file called core, which recall is just the contents of memory at the time your program crashed.
几乎这个教室里的所有人,在某个时候,都遇到过段错误,或者通过这个core文件的,存储器内核更新,这就是你的内存出现错误,你的程序崩溃掉了。
And when you call a function, one of the things X that happens is whatever your passing in, for instance, X, ; and if this is A, this thing gets copied into A; so at that moment in time of calling increment, I actually have two copies of the same value in memory but they're referred to by different names.
当你调用一个函数,其中发生的一件事情是,不管你输入什么,比如,或者是A,它把这个东西复制到A中;,调用increment的时候,实际上在内存中,有两个同样的值的内存块,但是它们有不同的名字。
应用推荐