#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW_SELF -2
#define M 3 //可利用空间总容量64K字的2的幂次,子表的个数为M+1 //书上为16
typedef int Status;
typedef int ElemType;
typedef struct WORD_b
{
struct WORD_b *llink; //指向前驱结点
int tag; //块标志,0:空闲,1:占用
int kval; //块大小,值为2幂次K
struct WORD_b *rlink; //头部域,指向后继结点
}WORD_b,head; //WORD:内存字类型,结点的第一个字也称为head
typedef struct HeadNode
{
int nodes
【数据结构】算法8.2 伙伴系统-分配
最新推荐文章于 2024-03-02 17:44:09 发布
![](https://img-home.csdnimg.cn/images/20240611030827.png)