I'm working on a C++ project where I want to utilize the TLSF (Two-Level Segregated Fit) allocator for managing memory allocations. Specifically, I need to implement a method, CanAllocate, which checks if there is enough contiguous memory available for allocation.
What would be the correct way to check for enough contiguous memory in a TLSF-based memory pool? I've gone through the TLSF code but couldn't find a method or approach that directly addresses the need for checking contiguous memory availability. Any insights or examples would be greatly appreciated. Thank you!