[PD-dev] memory locking policy

Tim Blechmann TimBlechmann at gmx.net
Wed Oct 20 15:39:48 CEST 2004


> > it seems this indeed can only be solved by allocating everything
> > in advance.. so what you suggest might be a good idea.
> > 
> > maybe a special-purpose malloc would do the trick?
> 
> i mean, one that does not free the pages to the kernel.
> like pdp works :)

that might be a solution ... or not allocating everything in advance,
but using a helper thread that keeps a few mb allocated ...
for the threaded soundfiler a few mb wouldn't be enough, since it works
on a second array ...

the easy approach would be to mlock the parts of memory after allocating
... the difficult approach to write a rt-save malloc ...

from what i understand the memory allocation in pdp, you keep track of
the already allocated memory ... i'm not sure, if this would solve our
problem ... of course there are many allocations of the same size, but
for other, especially big audio arrays, it will be very unlikely to
reuse the memory ... and that's exactly the point, where the threaded
soundfiler had it's problems ...

btw, is the function setrlimit() only available on linux or also on osx
and win32?

cheers ... tim

-- 
mailto:TimBlechmann at gmx.de    ICQ: 96771783
http://www.mokabar.tk

After one look at this planet any visitor from outer space 
would say "I want to see the manager."
				      William S. Burroughs




More information about the Pd-dev mailing list