• RAM is this memory recall or, as you'll soon find in problems Set One, that's used for ephemeral purposes.

    内存是随机存储器,你们将,在习题集1中发现,它们用来短暂存储的目的。

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

  • So, you know, we've got a bunch of juicy topics to dive into this week involving pointers and memory.

    这周我们有很多有趣的主题,包括指针和内存

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

  • Here's the problem with that technique, and by the way, a number of programming languages use this, including Lisp.

    这会指向元素的值,然后对内存进行切分,关于这种技术有个问题,顺路说下。

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

  • I've got some internal variables I have to store, what kinds of things do I have to keep track of?

    计算的时候需要占用多少内存,我需要存储一些内部变量,我需要记录哪些东西呢?

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

  • One of the perhaps easiest ones to put your finger on is what if the computer is out of memory?

    一个可能的情况是,计算机的内存不足?

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

  • So now that we begin to have this ability to express strings in memory, to understand what they are, we can start to apply actually real-world algorithms to them.

    现在我们开始用这个技能来在内存中表达字符串,来理解它们是什么,我们可以开始,我们可以对其使用实际的,现实生活中的算法。

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

  • Is is saying, do these things point to exactly the same spot in memory, the same instance.

    指向内存中的同一位置,同一个实例,深意义上的相等。

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

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

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

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

  • All right so it has to live in RAM as opposed to the hard drive because otherwise things would be terribly slow as you know so it's much better if your programs live while they're running in RAM and they end up in what's called the tech segment.

    好的,它存在内存中,而不是硬盘中,因为,否则程序会非常的缓慢,程序在内存中运行会好得多,它们在技术段,的地方结束。

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

  • Well, because the memory we've been using for local variables, and for functions, storage space is what computer scientists generally call the stack.

    好的,因为我们看到的内存是用于局部变量的,用于函数的,存储空间就是计算机科学家,通常说的堆。

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

  • Not by some very arcane numeric address inside my computer's memory, but by a symbol, by a name.

    不是通过一些在我电脑内存中的神秘的数字地址,而是通过一个符号,一个名字。

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

  • That is the address in memory in the heap of the first byte that the user typed in.

    那是用户输入的字符串第一个字节,内存中堆的地址。

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

  • When you're working on a file, it's saving constantly to RAM but also hopefully to disc, the hard disk so you don't actually lose it if the power goes off.

    当你打开一个文件,它不断地保存在内存中,但对于光盘,硬盘,当你断开电源的时候,数据不会丢失。

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

  • Here I actually need to tell the computer, "Give me some bytes in ram in which to store a value, and that value's going to be a floating point value."

    这里我的确需要告诉计算机,“给我一些字节内存,来存储一个值,那个值将是,浮点型的数值“

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

  • Somewhere in memory, back to back to back or all of the strings and with them can we store actual words and phrases.

    内存某处,紧邻的或者所有的字符串,我们用它们可以存储实际的单词,和短语。

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

  • Well, if you forget where the memory is that you asked for, well, in fact, that is how you make a memory leak.

    嗯,如果你忘了你申请的内存在哪里,呃,实际上,这就是造成内存泄露的原因。

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

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

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

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

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

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

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

  • But we know already from week zero that computers ultimately represent all information with numbers, and if they want to represent letters inside memory, well what do they do or what do they use?

    但是自从上周我们已经知道,计算机最终是用数字来表示所有的,信息,如果它们要描绘,在内存中的字母,它们该怎么做,用什么方式呢?

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

  • Now, if I've asked the user for a string and then a moment later I ask the user for another string, well, they're going to end up in different locations in memory just by nature of get string.

    现在,如果我要用户输入一个字符串,一会儿之后我要用户输入另一个字符串,他们最终是在,不同的内存地址中。

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

  • Its name is malloc for memory allocation and what malloc does for us is we say, hmm, the user has typed in a three-letter word.

    它为我们分配内存地址,它为用户输入的3个字母单词,分配地址。

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

  • You actually need to kind of do this and then you can swap these two numbers but it requires 50 percent more memory.

    你实际上需要这样做,然后才能交换两个数字,但是它需要多50%的内存

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

  • Two pieces of memory actually touching each other or you touching memory that you don't actually own, in which case the computer doesn't really know what to do and just, bam.

    两块内存相互覆盖,或者你覆盖了不存在的内存,那样的话计算机不知道,该怎么做,只有崩溃。

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

  • You can touch almost any part of memory in the computer systems that you want with your program, but do you want to?

    通过你的程序,你可以触及到计算机系统,内存的任意部分,但是那是你想要的吗?

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

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

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

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

  • Or another way of thinking about it, is remember I said when I call that class definition it creates an instance, that's a pointer to some spot in memory that's got some local information around it.

    也就是一个指向,内存中某处的指针,这个地方存有一些,这个实例的信息,浅意义的相等也就是说,看看这两个东西是不是。

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

  • Alright, so it turns out there're two other useful types that you don't get for free out of the box.

    我们还是回到这里,还有两种很有用的数据类型,这两种都不用担心内存不足。

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

  • There are absolutely going to be times where you're running a program where the programmer, say you, didn't possibly know in advanced how much RAM the program was going to need.

    它们总是在,程序员运行程序的地方,你可能预先不知道那个程序,需要多少内存

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

  • I've been using the blackboard a little ad hoc here, but suppose I neaten things up here now and present this rectangle is let's say R RAM, the memory inside of your computer.

    我在这里特别地使用这块黑板,假如我整理这些东西,把它们呈现,这个长方形,假如说就是内存,你电脑的内存

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

  • Why not write the program in a way where you figure out dynamically when the program is run how much memory you need rather than hard coding in two with or within that constant.

    为什么不写一个可以动态的方式写那个程序,程序可以动态分配内存,而不是用常量硬编码两个值。

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

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

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

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