• When you call a function, what actually happens is that function gets its own chunk of memory that's identical in size to the data type that it expects.

    当你调用一个函数,实际上发生的是,函数得到了自己的内存块,相同的类型,是占有一样大小的内存的。

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

  • It turns out that slightly before the stack, slightly before this conceptual chunk of memory, there's other things called environment variables that we may see over time but elsewhere in memory are other things.

    结果是稍微在堆之前,稍微在这个内存块概念之前,另外还一个东西叫做环境变量,我们之后可能看到,内存中的其他地方,是其他的东西。

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

  • Which may take up some arbitrary amount of memory. In that case, I'm back to this problem.

    然后将接下来的每一个内存块设置为,指向数组对应元素值的指针。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • 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 a little block of memory in RAM, you know, that represents four bytes, 32-bits and the Number Two is currently in it.

    它只是一小内存块,它表示4个字节,32位,那个数字2就存储在里面。

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

  • Well, if that function calls another function, you put another tray on, and so that new tray represents that function's chunk of memory.

    好的,如果那个函数调用另一个函数,你再放一个托盘在上面,新的托盘代表,那个函数的内存块

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

  • Conceptually, it's put at the top of my chunk of RAM, -- below it, goes initialized and uninitialized data -- - this is a fancy way of saying global variables come next -- and below that, comes what's called the heap.

    概念上,它放置在内存块的顶端,在下面,已初始化的和未初始化的数据-,这是一种指明紧随其后的全局变量的设想方式-,在后来,引入了一个叫做堆的东西。

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

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

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

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

  • And this would point to value, and this would point off someplace in memory.

    需要多少个基本内存块,然后我就得知下一个元素的位置了。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • But we said earlier that, you know, we're going to get - to the point where we want to have a lot of pieces of -- a lot of variables in memory, maybe 140,000 dictionary words for some future peace set, but we don't want to enumerate line by line by line 140,000 variables.

    但是我们之前说过,你们知道的,我们将获得,有很多--很多变量的内存的指针-,可能有140,000个单词的集合,但是我们不想一行行地列举,140,000行变量。

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

  • 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的时候,实际上在内存中,有两个同样的值的内存块,但是它们有不同的名字。

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

  • It's reasonable because it's meant TMP for temporary purposes just to call it temp or T-M-P for short, X and I can define temp as -- why don't I set it as equal to X, initially, because now that I've stored X in a separate chunk of memory, I can now change its value and then I can say Y gets, not X, but temp, and so now I've actually swapped these values.

    这是合理的,因为它是为,暂时的目的,只要叫它Temp或简称它为,我可以定义temp为--为什么我不把它设定为等于,最初的,因为现在我把X存储在一个单独的内存块中,我现在可以改变它的值,然后我说Y等于,不是X,而是temp,所以现在我交换这些值。

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

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

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

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