That is the address in memory in the heap of the first byte that the user typed in.
那是用户输入的字符串第一个字节,内存中堆的地址。
You're calling functions, functions, functions, but you're allocating heap, heap, heap, heap memory for your words.
我们一直调用函数,函数,函数,你一直为单词分配堆,堆,堆,堆。
So the heap is a chunk of memory in a computer's RAM that's conceptually allocated to what's called dynamic memory allocation.
堆是在计算机RAM中的一块内存,它可以进行,动态内存分配。
Well, there's a chunk of memory called the heap that you can grab as much memory as you want so long as it exists for your program.
好的,这里有一块叫做堆的内存,这样你就可以获得你想要那么多的内存,因为它为你的程序而存在。
This is the heap somewhere else in memory, but they are, in fact, in distinct locations.
这是内存中的堆,但实际上,它们在不同的地方。
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时,我们分配一块内存,但它不是来自栈;,而是来自于叫做堆的,内存的一部分。
应用推荐