在介绍动态存储分配技术基本机制的基础上,对MySQL中InnoDB引擎的动态存储管理所采用的二进制伙伴算法进行了深入的分析,该算法的优点是简单、速度快,缺点是由于只归并伙伴而容易产生碎片.
Binnary buddy algorithm used in dynamic storage management of InnoDB engine in MySQL is analyzed deeply after introducing the basic machanisms of dynamic storage allocation. The advantage of this algorithm is simple and fast, while its disadvantage is prone to produce fragmentation caused by coalescing buddy only.