It turns out when we call string a string, we're really referring not to those characters but to the address, the location and memory of those characters.
当我说字符串时,我并不是指这些字符集,而是指地址,就是这些字符集在存储器中的位置。
No, I think somebody had to make up a story, but the memory of kings was not of a Tarquinius.
我想总有人得编故事,而这传说中的国王并非一个,"塔克文"式的
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.
为什么不写一个可以动态的方式写那个程序,程序可以动态分配内存,而不是用常量硬编码两个值。
And by that, I mean, not how much memory do I need to store the size of the input, it's really how much internal memory do I use up as I go through the computation?
需要占用多少内存,我意思并不是,存储输入需要多少内存,而是当我完成这个?
Now I have not only these great stories but this very important memory of what that community meant to him at that time.
我不仅仅收获了这些美妙的故事,还收获了重要的记忆,知道了在那时,集体于他意味着什么。
If we had this sort of progressive all-radical alteration, not just minimal alteration, but radical alterations of my memory, my beliefs, my desires, my tastes.
如果我们持续经历剧烈变化,不只是最小的变化,而是自己的记忆,信仰,渴望,品味都发生剧烈变化。
He said:The good, lasting stuff comes out of one's individual imagination, and sensitivity to, and comprehension of, not out of the memory of one's own grief.
他说:,“美好的和长久的东西,来源于人们自己的想像,而不是来自个人记忆中的不幸。
Those doctors would still not be able to improve school performance of the kids with learning disabilities and they would still not be able to prevent cognitive impairment and loss of memory in older adults because at this point we don't really understand enough about learning To know which neurons and synapses within a circuit would need to be tinkered with.
他恐怕还是改变不了有学习障碍的孩子们的表现,阻挡不了老年人的认知功能损害和记忆力的衰退,因为我们对这一学科的确知之甚少,不知道知道回路中的到底是哪些神经元和神经突触需要修复。
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.
其中一个方式能使你的程序崩溃掉,有意或无意的,它本质上使用了太多的内存,或者调用了太多的函数,所发生的,崩掉,一个冲突了另一个,然后发生了坏事情。
Not by some very arcane numeric address inside my computer's memory, but by a symbol, by a name.
不是通过一些在我电脑内存中的神秘的数字地址,而是通过一个符号,一个名字。
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.
嗯,那表示你没有正确地使用内存,我们将详细讨论,怎样操纵计算机的内存,以后,我们还将提及,可能发生的有害的操作。
His memory would not be carried forward into the future.
他的故事也不会被后世所传颂
Only the operating system has controlling of byte zero NULL in the computer's RAM and so if a function ever returns null, aka zero, well, something must have gone wrong because that can't possibly belong to me that memory because by human convention zero is owned by the operating system; not by a program I wrote.
只用操作系统在内存中能够控制,字节0,并且如果一个函数返回,或者说0,好的,可能出错了,因为那可能是不属于我的内存,因为惯例上,0是由操作系统拥有的,而不是由我的程序拥有的。
If we make--If we solve the problem of boredom setting in with progressive memory loss and radical personality changes, maybe boredom won't set in, but it's not anything that I especially want for myself.
如果用持续失忆,和剧烈人格变化来解决无聊的问题,也许不会产生无聊,但那不是我特别想做的事。
This course is not about memory.
这个课不是要你们死记硬背的。
So even though we're not literally throwing RAM away, we're not physically moving anything, conceptually, we have to go through memory in this order back to back to back and then undo it.
即使我们没有把内存依次扔掉,我们物理上没有移动任何东西,概念地,我们必须按照顺序经过内存,回到这里然后撤销它。
So the fact that I'm erasing it does not mean that the computer erased that memory or over wrote those values with all zeros.
事实上,我清除它的意思,不是说计算机把内存清除,或者用0覆盖这些值。
Now finally swap has the ability, the power, to modify memory that isn't his own, that's not in his own scope because we've passed it in by address.
最终swap有能力,来修改不属于它的内存,不在它的作用域中,因为我们是通过地址传递的。
You just forget where the memory is that you asked for on the heap and it's not going to get cleaned up on the stack because malloc puts it somewhere else.
你忘了你在堆中申请的内存在哪里,它将会被栈清除,因为malloc把它放在别的地方。
So, certainly the CS50 Library designed to be dynamic and, in fact, any time you call get string, we are, in fact, ; allocating a chunk of RAM but it's not coming from the stack; it's actually coming from this portion of memory called the heap.
所以,Cs50库是动态设计的,实际上,每次你调用GetSting时,我们分配一块内存,但它不是来自栈;,而是来自于叫做堆的,内存的一部分。
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,所以现在我交换这些值。
应用推荐