Open
Description
Describe problem solved by the proposed feature
- 目前内存池的申请接口是带句柄,释放接口是不带句柄的
- 内容池的数据块要求没有block都要额外的增加4个字节,他的目的其实是为了在malloc的时候保存当前对象句柄。在free的时候,还原句柄,然后归还block。
- 从上面的角度去看,每个block都浪费4个字节(浪费空间),free的时候还需要额外的还原句柄(浪费时间)
Describe your preferred solution
free接口增加句柄的好处
- 节省每个block的额外的4个字节。
- 明确了释放接口的内存对象句柄。
- 释放空间能节省时间
Describe possible alternatives
No response