discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] buffer allocation failed


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] buffer allocation failed
Date: Fri, 9 May 2008 09:21:14 -0700
User-agent: Mutt/1.5.17 (2007-11-01)

On Fri, May 09, 2008 at 08:42:35AM -0700, Dan Halperin wrote:
> Hey,
> 
> I know that the buffer allocation uses some memory mapping tricks to  
> make it efficient; is there some shared resource that this process  
> uses of which a computer should have a finite amount? I'm running a  
> process with, oh, say 500 buffers (estimate) or so and once I get past  
> 7 parallel instances running I get std::bad_alloc errors allocating  
> the buffers. Each process used only about 32m of virtual memory...
> 
> Is this expected?
> Thanks,
> Dan

Depending on which of the vmcircbuf tricks it's using it runs into a
different system limit.  By default on Linux it's usually using
gr_vmcircbuf_sysv_shm_factory.  You can check this by cat'ing
~/.gnuradio/.prefs/gr_vmcircbuf_default_factory.

You're probably running into a limit on the total number of shared
memory segments in the system (SHMMNI) or the max segs per process
(SHMMSEG).  You can check the current values by:

  $ cat /sys/proc/kernel/shmmni

You can set the value one time using

  $ cat 4096 >/sys/proc/kernel/shmni

or arrange to have it always set by editing /etc/sysctl.conf

Eric




reply via email to

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