size_t approxBytesAllocatedSmallBufferImpl()

in dispenso/small_buffer_allocator.cpp [109:127]


size_t approxBytesAllocatedSmallBufferImpl(size_t ordinal) {
  switch (ordinal) {
    case 0:
      return detail::SmallBufferAllocator<8>::bytesAllocated();
    case 1:
      return detail::SmallBufferAllocator<16>::bytesAllocated();
    case 2:
      return detail::SmallBufferAllocator<32>::bytesAllocated();
    case 3:
      return detail::SmallBufferAllocator<64>::bytesAllocated();
    case 4:
      return detail::SmallBufferAllocator<128>::bytesAllocated();
    case 5:
      return detail::SmallBufferAllocator<256>::bytesAllocated();
    default:
      assert(false && "Invalid small buffer ordinal requested");
      return 0;
  }
}