Skip to content

Commit

Permalink
clarify parameter usage in tslf_create
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe44 committed Nov 5, 2021
1 parent 4281ead commit dc3a20a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/heap/heap_tlsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ void tlsf_remove_pool(tlsf_t tlsf, pool_t pool)
*/


tlsf_t tlsf_create(void* mem, size_t bytes)
tlsf_t tlsf_create(void* mem, size_t max_bytes)
{
#if _DEBUG
if (test_ffs_fls())
Expand All @@ -800,7 +800,7 @@ tlsf_t tlsf_create(void* mem, size_t bytes)
return 0;
}

control_construct(tlsf_cast(control_t*, mem), bytes);
control_construct(tlsf_cast(control_t*, mem), max_bytes);

return tlsf_cast(tlsf_t, mem);
}
Expand Down
2 changes: 1 addition & 1 deletion components/heap/heap_tlsf.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ typedef void* tlsf_t;
typedef void* pool_t;

/* Create/destroy a memory pool. */
tlsf_t tlsf_create(void* mem, size_t bytes);
tlsf_t tlsf_create(void* mem, size_t max_bytes);
tlsf_t tlsf_create_with_pool(void* mem, size_t pool_bytes, size_t max_bytes);
pool_t tlsf_get_pool(tlsf_t tlsf);

Expand Down

0 comments on commit dc3a20a

Please sign in to comment.