2021-05-01 | Paul Boddie | raw files shortlog changelog graph | Fixed region allocation when no more regions are available. | |
libmem/lib/src/memory_preallocated.cc (file) |
1.1 --- a/libmem/lib/src/memory_preallocated.cc Sat Apr 24 23:15:21 2021 +0200 1.2 +++ b/libmem/lib/src/memory_preallocated.cc Sat May 01 01:46:33 2021 +0200 1.3 @@ -62,6 +62,9 @@ 1.4 { 1.5 std::lock_guard<std::mutex> guard(_lock); 1.6 1.7 + if (_regions.empty()) 1.8 + return NULL; 1.9 + 1.10 Region *region = _regions.front(); 1.11 1.12 _regions.pop_front();