java 堆的数据结构_堆内存和数据结构堆之间的关系是什么?

我也有这个疑问很多年啊,数据结构中的heap应该是历史悠久的,那为啥内存堆也用heap这个词呢?直到我看到这个回答,原来是程序员中的老战斗机Knuth把Heap这个词推广了。

Donald Knuth says (The Art of Computer Programming, Third Ed., Vol. 1, p. 435):Several authors began about 1975 to call the pool of available memory a "heap."

He doesn't say which authors and doesn't give references to any specific papers, but does say that the use of the term "heap" in relation to priority queues is the traditional sense of the word.

但也不是乱用,那时候估计有一些高级语言使用数据结构的Heap或者叫Priority Queue来找到最小可用的内存块。

看这位仁兄的评论:Wikipedia claims that it's because at an early stage Lisp used a heap (data structure) to implement its memory store. It doesn't say how. Its reference is "Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest (1990): Introduction to algorithms. MIT Press / McGraw-Hill.", which I don't have.– Steve Jessop

他说早期的Lisp就是使用数据结构堆来做内存池的。

所以也不能说早先两个Heap完全没有关系, 但现在的确是没有任何关系了。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值