1.格式优化。
This commit is contained in:
@@ -121,7 +121,7 @@ int mr_heap_init(void)
|
||||
}
|
||||
|
||||
/* 字节向上做4对齐 */
|
||||
size = MR_ALIGN4_UP(size);
|
||||
size = MR_ALIGN_UP(size, 4);
|
||||
|
||||
/* 找到符合内存分配大小的内存块 */
|
||||
while (block->size < size)
|
||||
|
||||
@@ -130,7 +130,7 @@ void *mr_malloc(size_t size)
|
||||
}
|
||||
|
||||
/* Align the size to the next multiple of 4 bytes */
|
||||
size = MR_ALIGN4_UP(size);
|
||||
size = MR_ALIGN_UP(size, 4);
|
||||
|
||||
/* Find a memory block that can accommodate the requested size */
|
||||
while (block->size < size)
|
||||
|
||||
Reference in New Issue
Block a user