[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] A question of memory

From: Dave Serls
Subject: Re: [fluid-dev] A question of memory
Date: Tue, 28 Nov 2006 07:52:32 -0700

I've been having an enlightening offline discussion with P. Millar about
memory usage within fluidsynth, particularly the 'mlocking' of soundfont
sample data areas.  I've done some cursory exploration of the source code
and come to the conclusion that the hypothetical average user (of which there
are none for fluidsynth) can only be hurt by the current scheme.  Certainly,
any user who uses one or more large General Midi soundfonts will be at a

The only memory that is locked is the sample data for each soundfont.
The channel, preset, sample, voice, and audio buffer areas, although much 
are not locked.  When the amount of locked sample storage becomes a significant 
of the real system memory, the likelihood of a paging event involving the other 
increases dramatically, followed by interrupted audio.

The simplest solution -- buy more memory, which is what I did.  Others may not
be able to do this.

A complex solution -- lock all the metadata when allocated, then lock the sample
data, generators, loops, headers for each program as it becomes an active 
similarly unlocking the previous preset occupant of the channel. 

There's also the potential issue of fluidsynth stack frames, and program pages 
page faults. This could be handled by an early mlockall invocation.

Maybe that no one else has run into this problem, and I'm tilting at windmills?

*   Dave Serls                                 Littleton, CO, USA      *
*   dashs.denver.co.us                         dashs.com               *

reply via email to

[Prev in Thread] Current Thread [Next in Thread]