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就存储在里面。
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.
概念上,它放置在内存块的顶端,在下面,已初始化的和未初始化的数据-,这是一种指明紧随其后的全局变量的设想方式-,在后来,引入了一个叫做堆的东西。
When you double-click a program, it's loaded into RAM.
当你双击一个程序,它被加载到内存中。
D-A-V-I-D So when you get a string like D-A-V-I-D, what's really happening is inside your computer's RAM is going a byte where there's some zeros and ones.
譬如你有这么一个字符串,而在你电脑的RAM里将会变成,一个个由0和1组成的字节。
So that means if you-- whether you own a Mac, PC or whatever, you have a whole chunk of RAM memory which you can draw for instance as a rectangle, if you can't quite see.
也就是说,无论你的电脑是Mac也好,PC也好或其他什么的,你会有厚厚一块RAM存储器,我们可以把它画成长方形,你们有可能看不到。
Now that's changing the more years that pass the more of you have 64-bit computers and the more servers have many, many gigabytes of RAM and so you need actually 64-bits, but for now let's assume a common system whereby a pointer just by definition of the homework is 32 bits.
现在计算机也在改变,也有更多的人,使用64位的计算机,更多的服务器有很多,很多G的内存,那样你就需要64位的,现在我们假设通常的系统中,根据家庭作业所定义的,一个指针为32位。
Instead I'm going to be expecting the address of some int and the address of another int and thanks to this address I can literally find this address in RAM, do anything I want there, -- return and what I've just done is actually changed or mutate the values of those original variables.
我们所期望的是int型地址,和另外一个int型地址,幸亏这个地址,我可以找在RAM中找到它的地址,然后做我想做的事情,返回我处理后的东西,我可能改变了这些源变量。
应用推荐