diff options
Diffstat (limited to 'gnuradio-runtime/lib/flat_flowgraph.cc')
-rw-r--r-- | gnuradio-runtime/lib/flat_flowgraph.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gnuradio-runtime/lib/flat_flowgraph.cc b/gnuradio-runtime/lib/flat_flowgraph.cc index b8a1a67bc7..ae79288334 100644 --- a/gnuradio-runtime/lib/flat_flowgraph.cc +++ b/gnuradio-runtime/lib/flat_flowgraph.cc @@ -161,7 +161,16 @@ namespace gr { } // std::cout << "make_buffer(" << nitems << ", " << item_size << ", " << grblock << "\n"; - return make_buffer(nitems, item_size, grblock); + // We're going to let this fail once and retry. If that fails, + // throw and exit. + buffer_sptr b; + try { + b = make_buffer(nitems, item_size, grblock); + } + catch(std::bad_alloc&) { + b = make_buffer(nitems, item_size, grblock); + } + return b; } void |