Can't increase memSize after installing VSTPlugin

Hi, ever since installing VSTPlugin, I’m not really able to increase the memSize. I can increase it to a maximum of 2097000, but this isn’t enough. Before I was able to get much larger numbers e.g.

s.options.memSize = 3.pow(20);

Not sure why this plugin would stop me from making increases, or how to go about solving this issue. Here is my post window output after rebooting the server:

Booting server 'localhost' on address
VSTPlugin 0.6-pre1
Exception in World_New: alloc failed, increase server's memory allocation (e.g. via ServerOptions)
Server 'localhost' exited with exit code 0.

Any help would be very much appreciated. Thanks

I don’t have an answer about VSTPlugin, but I’m curious what is the use case where 2 GB of real time memory is not enough. That’s a lot of delay lines or independent reverbs.

Edit: I ask because the usual large memory-consumer in the Server is regular Buffers – but these do not allocate from the real-time pool – they allocate the normal way, from the OS. Increasing real-time memory by this much won’t help with Buffers. Real-time memory is used for LocalBuf (not really recommended to alloc huge LocalBufs – use Buffer for really big ones), or delay lines (where 1 GB of memory is mono 1.7 hours at 44.1 kHz), or some PV_ units (which aren’t likely to be large) or reverbs (JPverb advises increasing memSize but not up to multiple GB). I suspect there may be a misunderstanding here – almost certainly there’s a solution which doesn’t involve a multi-GB rt pool.


I don’t see how the VSTPlugin plugin itself could possible mess with the RT memory pool. Only the actual UGen allocates RT memory. I’m pretty sure this is a red herring.

Actually, this error message is strange. Why would World_New allocate any RT memory – except for the RT memory pool itself? Maybe it’s the latter that is failing because your system is low on RAM (and swap space)?

The memSize is (according to the docs) measured in kilobytes…

…divide by 1000 to get to mega, then again to get to giga, then again to get to tera…

you are trying to allocate 3.4 tera bytes of RAM there.

edit: tera not peta

1 Like

then again to get to giga, then again to get to peta…

You skipped tera :wink:

s.options.memSize = 3.pow(20);

Good catch! I guess that should’ve been 2.pow(20) :smiley: That would be still a lot (1 GB), but it should’t cause an out-of-memory error.

Yeah sorry I got the number wrong there, thanks for the correction. But regardless, I can’t seem to allocate enough memory. I would like to do something like s.options.memSize = 3000000;. If I run the vst plugin along a few other simple calculations at the moment then the server overloads pretty quickly. I was wondering if there was a memory allocation issue.

If I run the vst plugin along a few other simple calculations at the moment

Wait! That’s a big difference. So the problem only occurs if you actually run Synths with VSTPlugin instances? In that case, your issue discription would be a bit misleading, as the problem wouldn’t be caused by “installing VSTPlugin”.

then the server overloads pretty quickly.

What do you mean by “overload”?

As @jamshark70 has said, there is hardly a situation where you would need 3 GB of RT memory in the first place.

Please provide your complete Server options.

Also provide a minimal code example that triggers the problem.