static int get_malloc_block_total_size(void *ptr)
{
    mbed_heap_overhead_t *c = (mbed_heap_overhead_t *)((char *)ptr - offsetof(mbed_heap_overhead, next));

    // Skip the padding area
    if (c->size < 0) {
        c = (mbed_heap_overhead_t *)((char *)c + c->size);
    }
    //  Mask LSB as it is used for usage flags
    return (c->size & ~0x1);
}
static int get_malloc_block_total_size(void *ptr)
{
    mbed_heap_overhead_t *c = (mbed_heap_overhead_t *)((char *)ptr - offsetof(mbed_heap_overhead, next));

     
    if (c->size < 0) {
        c = (mbed_heap_overhead_t *)((char *)c + c->size);
    }
     
    return (c->size & ~0x1);
}