由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - how much slower: heap vs stack memory allocation?
相关主题
"brk()" 和 mmap() 有什么区别? (转载)C语言的变量都一定要放在stack上吗?
static variable存在heap还是stack?数据结构的Heap和内存中的Heap有没有联系?
stack/heap corruption请教什么时候变量会被load进stack,什么时候进入heap呢?
问一个private destructor的问题another c++ interview question
[合集] 谁给个stack-based allocation 的C++的例子?一个基本问题:stack vs heap
为什么会有recursion stack overflow这个问题?heap 和 stack问题
array allocation in c再问C++初始化问题。
关于thread的stack谁给科普一下一般系统的stack和heap内存各有多大?
相关话题的讨论汇总
话题: memory话题: heap话题: allocation话题: slower话题: stack
进入Programming版参与讨论
1 (共1页)
w*******y
发帖数: 372
1
We know that using heap-allocated memory is slower than stack memory. Can
anyone tell me how much slower is the heap memory allocation? A numerical
analysis on a popular implementation would be terrific, e.g., linux. Another
stupid question: after memory allocation, the access to heap memory should
be as fast as to stack memory, right?
Thanks.
w*******y
发帖数: 372
2
links is here:
http://www.bozemanpass.com/info/linux/malloc/Linux_Heap_Contention.html

about

【在 w*******y 的大作中提到】
: We know that using heap-allocated memory is slower than stack memory. Can
: anyone tell me how much slower is the heap memory allocation? A numerical
: analysis on a popular implementation would be terrific, e.g., linux. Another
: stupid question: after memory allocation, the access to heap memory should
: be as fast as to stack memory, right?
: Thanks.

w*******y
发帖数: 372
W*********g
发帖数: 409
4
You are talking about the default heap. You can create your own heap with
certain option to avoid that.
1 (共1页)
进入Programming版参与讨论
相关主题
谁给科普一下一般系统的stack和heap内存各有多大?[合集] 谁给个stack-based allocation 的C++的例子?
heap&stack Linux vs. Windows为什么会有recursion stack overflow这个问题?
STL堆操作怎样对堆顶元素做ShiftDown?array allocation in c
Windows下多个DLL之间memory allocation问题关于thread的stack
"brk()" 和 mmap() 有什么区别? (转载)C语言的变量都一定要放在stack上吗?
static variable存在heap还是stack?数据结构的Heap和内存中的Heap有没有联系?
stack/heap corruption请教什么时候变量会被load进stack,什么时候进入heap呢?
问一个private destructor的问题another c++ interview question
相关话题的讨论汇总
话题: memory话题: heap话题: allocation话题: slower话题: stack