]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
buffer: throw assertion when mmap allocations fail
authorSage Weil <sage@newdream.net>
Wed, 9 Apr 2008 18:19:34 +0000 (11:19 -0700)
committerSage Weil <sage@newdream.net>
Wed, 9 Apr 2008 18:19:34 +0000 (11:19 -0700)
src/include/buffer.h

index 387cf2e33a6e6ccaeafd8861c2a070a300f25a7b..eeb24917813fa03a0d0304e692d76db1ed02d3cf 100644 (file)
@@ -114,6 +114,7 @@ private:
   public:
     raw_mmap_pages(unsigned l) : raw(l) {
       data = (char*)::mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
+      assert(data);
       inc_total_alloc(len);
     }
     ~raw_mmap_pages() {