您必须与项目技术领导者紧密合作,以了解如何分割工作,决定谁来分配工作,以及了解一个实际的变更到底是怎样负责或者简单。
You must work closely with the project technical leads to understand how to divide up the work, decide to whom to assign the work, and understand just how complicated or simple a change actually is.
例如,让分配器判断通过合并块能获取多少总共的连续空间的开销和直接合并然后分割它们的开销一样大。
For example, it is just as costly for an allocator to determine how much total contiguous space would be gained by coalescing chunks as it would be to just coalesce them and then resplit them.
如果重新分配的块小于原来的块,那么把它分割开,多余的块返回给空闲树,请求的块返回给调用者。
If the size of the reallocated block is smaller than the original block, the block is split and the extra block is returned to the free tree with the required size block being returned to the caller.
应用推荐