• And one of the ways you can make a program crash, intentionally or not, is to essentially use up too much memory or call too many functions and what happens is, bam, one hits the other and bad things happen.

    其中一个方式能使你的程序崩溃掉,有意或无意的,它本质上使用了太多的内存,或者调用了太多的函数,所发生的,崩掉,一个冲突了另一个,然后发生了坏事情。

    哈佛公开课 - 计算机科学课程节选

  • Well, again, just as I said verbally a moment ago, if you're going here, you're literally touching, trying to read or change memory that's beyond the boundaries of a chunk of memory that you're supposed to be touching based on its length.

    嗯,再次强调,就像我刚才说的,如果你从这里出发,你将依次接触到,试着读取或者改变内存,如果超出了你可以使用的,内存块长度的界限。

    哈佛公开课 - 计算机科学课程节选

  • I have no idea what's here at the moment so I'm just going to draw a question mark because that memory might have been used previously for some other purpose, but we know it's currently available to us so we have four bytes of memory.

    我不知道在此刻这里是什么,所以我画一个问号,因为那块内存可能在之前,为其它的目的而使用过,但是我们知道它可以为我们所使用,这样我们就有4个字节的内存

    哈佛公开课 - 计算机科学课程节选

  • It's just some random chunk of four bytes that happens to be available at this point in time, but I can put something there.

    只是一些随机的四字节的内存块,在这里是可以使用的,但是我可以在那里放置东西。

    哈佛公开课 - 计算机科学课程节选

  • Well, this will, in fact, be declared, but, unfortunately, you're using a different chunk of memory.

    好的,这个被声明了,但是,不幸的是,你在使用一块不同的内存

    哈佛公开课 - 计算机科学课程节选

  • Well, if you want to call a function, it's like putting another tray on that stack of trays and that tray represents a chunk of memory that, that function can use.

    嗯,如果你想调用一个函数,这就像把一个托盘放到另一个托盘上,托盘代表一块,函数可以使用内存

    哈佛公开课 - 计算机科学课程节选

  • I can certainly try to write the number 13 there, but bam, my program very likely will crash if this chunk of memory was not given to me previously by the operating system and maybe it is owned by the operating system.

    我当然可以在那里写下数字13,但是“嘣“,如果这块内存不是系统预先给我的,我的程序很可能会崩溃,可能这块内存,是系统本身使用的。

    哈佛公开课 - 计算机科学课程节选

  • 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.

    嗯,那表示你没有正确地使用内存,我们将详细讨论,怎样操纵计算机的内存,以后,我们还将提及,可能发生的有害的操作。

    哈佛公开课 - 计算机科学课程节选

  • I need access to more memory, and I need it fast.

    我需要使用更多内存,想要它更快点。

    哈佛公开课 - 计算机科学课程节选

  • Whereas, right now we only have access to this memory.

    然而,现在我们只能使用这个内存

    哈佛公开课 - 计算机科学课程节选

  • So, conceptually if you've ever wondered why you get access in all of your functions to global variables that's because they're not down here, they're at the very top of RAM and any function can access that RAM way up there, but for now the interesting player in the story is this thing called the heap.

    所以,如果你想知道为什么全局变量能在,所有的函数中使用,那是因为它们不在这下面,而是在内存的顶端,那样任意函数都可以在内存使用它们,现在,这里面一个有用的角色是,叫做堆的东西。

    哈佛公开课 - 计算机科学课程节选

  • So down below is generally where main's memory goes.

    在底下,通常是main函数使用内存

    哈佛公开课 - 计算机科学课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定