l*******p 发帖数: 7 | 1 语言:c++
网上查了一下,有的说是heap,有的说机不再heap也不再stack
请问到底再哪里?
先谢了 |
q*****g 发帖数: 72 | 2 既不在heap,也不在stack, 在global name space里
【在 l*******p 的大作中提到】 : 语言:c++ : 网上查了一下,有的说是heap,有的说机不再heap也不再stack : 请问到底再哪里? : 先谢了
|
t**m 发帖数: 263 | 3 not stack
kind of globle heap
【在 l*******p 的大作中提到】 : 语言:c++ : 网上查了一下,有的说是heap,有的说机不再heap也不再stack : 请问到底再哪里? : 先谢了
|
D*******a 发帖数: 3688 | 4 在bss里面
【在 l*******p 的大作中提到】 : 语言:c++ : 网上查了一下,有的说是heap,有的说机不再heap也不再stack : 请问到底再哪里? : 先谢了
|
t*******l 发帖数: 3662 | 5 really? who says "heap" and who says "stack".
the language itself does not specify any data segment for the static
variable as long as the behavior is correct.
in practice, many systems will put static variables into
the data segment (if initialized)
or the bss segment (if uninitialized).
【在 l*******p 的大作中提到】 : 语言:c++ : 网上查了一下,有的说是heap,有的说机不再heap也不再stack : 请问到底再哪里? : 先谢了
|
b*****n 发帖数: 2324 | 6 wherever it's placed, its address is fixed.
【在 l*******p 的大作中提到】 : 语言:c++ : 网上查了一下,有的说是heap,有的说机不再heap也不再stack : 请问到底再哪里? : 先谢了
|
b****p 发帖数: 13 | 7 不一定吧。如果初始化了,就不在bss,应该在data段吧。
【在 D*******a 的大作中提到】 : 在bss里面
|
j********g 发帖数: 88 | 8 it is not dynamic memory allocation. So dynamic memory allocation methods
are not applicapable. |