fix some bugs

This commit is contained in:
Huang_Yuqing
2021-05-18 09:59:15 +08:00
parent 86d96159fe
commit 829f05296a
5 changed files with 15 additions and 33 deletions

View File

@@ -66,7 +66,7 @@ struct DynamicAllocNode
*/
struct DynamicFreeNode
{
uint32 size; /* the size of dynamicAllocNode */
x_size_t size; /* the size of dynamicAllocNode */
uint32 prev_adj_size; /* the size of the previous adjacent node, (dynamic alloc node or dynamic free node */
struct DynamicFreeNode *next;
@@ -341,7 +341,7 @@ static void* BigMemMalloc(struct DynamicBuddyMemory *dynamic_buddy, x_size_t siz
};
/* get the best-fit freeNode */
if (node) {
if (node && (node->size > allocsize)) {
struct DynamicFreeNode *remainder;
struct DynamicFreeNode *next;
x_size_t remaining;