Skip to content

Mbed5 memory profiling #2475

@javier-moreno-tridonic-com

Description

Note: This is just a template, so feel free to use/remove the unnecessary things

Description

Type: Question
Priority: Minor

Question

On mbed 3 the "ualloc" yotta module was used for malloc and free implementation. This allowed us to enable and customise an UART trace, allowing us to study the dynamic memory performance our code and look for optimisations. E.g.

void *mbed_ualloc(size_t bytes, UAllocTraits_t traits, void *cb_caller)
{
    void *caller;
    if (cb_caller == NULL) {
        caller = (void*)caller_addr();
    } else {
        caller = cb_caller;
    }
    void *p = mbed_ualloc_internal(bytes, traits, caller);
    if (!prevent_tracing) {
        prevent_tracing = 1;
        ualloc_debug(UALLOC_DEBUG_LOG, "ua c:%p s:%u m:%p\n", caller, (unsigned)bytes, p);
        prevent_tracing = 0;
    }
    return p;
}

So far I could not figure out how to replicate this in mbed5. Is this memory tracing still a possibility?

@MarceloSalazar @markus-becker-tridonic-com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions