1.格式优化。

This commit is contained in:
MacRsh
2024-01-31 22:50:21 +08:00
parent b218bbdbd2
commit 2218b8ec71
3 changed files with 19 additions and 34 deletions

View File

@@ -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)

View File

@@ -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)