Memory management for (audio) buffers in plugins

Home Forums OWL OwlWare Memory management for (audio) buffers in plugins

This topic contains 4 replies, has 3 voices, and was last updated by  Martin Klang 2 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1274

    martind
    Participant

    I just noticed that none of the official plugins appear to free memory that was used for audio buffers. Am I ever expected to free such memory when the plugin is unloaded?

    Two plugins can be loaded at a time, and more plugins can be chosen at runtime using OwlNest. What happens to allocated memory as plugins are switched out?

    (Theoretically the same AudioBuffer address space could be multiply allocated across plugins as long as only one plugin runs at a time.)

    #1276

    Martin Klang
    Keymaster

    Memory allocated with createMemoryBuffer() is managed and doesn’t have to be (shouldn’t be!) freed. I’ll put a note in the wiki.
    In OwlSim, the memory is allocated on the heap and released when the patch dies, on the pedal the memory is allocated on the external SRAM and re-used when a patch is swapped out.

    #1277

    martind
    Participant

    Oh that’s neat, thanks for the info!

    #1988

    jagspaul
    Participant

    on the pedal the memory is allocated on the external SRAM and re-used when a patch is swapped out

    Can you tell me how malloc use external SRAM for memory allocation?
    In owl ware source code how you are doing this?

    I need to know how to modify/configure source code to allow malloc to use External SRAM instead of embedded SRAM for STM32 cpu.

    thanks & regards

    #1990

    Martin Klang
    Keymaster

    Duplicate of this.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.


Latest News

Links

Follow us on Twitter