[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] The effect of FUSB_BLOCK_SIZE and FUSB_NBLOCKS
From: |
Stefan Brüns |
Subject: |
Re: [Discuss-gnuradio] The effect of FUSB_BLOCK_SIZE and FUSB_NBLOCKS |
Date: |
Wed, 04 Mar 2009 15:39:16 +0100 |
User-agent: |
KMail/1.9.9 |
On Wednesday 04 March 2009 12:26:09 Stefan Bruens wrote:
> 0 means default. Excerpt from fusb_linux.cc:
> ---
> static const int MAX_BLOCK_SIZE = fusb_sysconfig::max_block_size();
> static const int DEFAULT_BLOCK_SIZE = MAX_BLOCK_SIZE;
> static const int DEFAULT_BUFFER_SIZE = 4 * (1L << 20);
> if (d_block_size == 0)
> d_block_size = DEFAULT_BLOCK_SIZE;
> if (d_nblocks == 0)
> d_nblocks = std::max (1, DEFAULT_BUFFER_SIZE / d_block_size);
> ---
> max_block_size() is 16kB
Just a small correction, usrp_basic.cc sets default values on its own, taken
from fusb_sysconfig_linux.cc, so it ends up with:
default block size: 4kB
default buffer size: 1MB
number of blocks: 1MB/4kB => 256
so on Linux {0,0} is the same as {4096,256}. Values for OsX/Win/BSD might be
different.
Stefan
--
Stefan Brüns / Bergstraße 21 / 52062 Aachen
mailto:lurch at gmx.li http://www.kawo1.rwth-aachen.de/~lurchi/
phone: +49 241 53809034 mobile: +49 151 50412019