Branch: Tag:

2013-06-13

2013-06-13 21:35:42 by Arne Goedeke <el@laramies.com>

block_alloc: memusage stats could overflow

89:   }      PMOD_EXPORT void ba_count_all(const struct block_allocator * a, size_t * num, size_t * size) { +  if (a->size) {    size_t n = (a->l.blocks << (a->size-1)) - a->l.blocks;    *num = n;    *size = a->l.block_size * n; -  +  } else { +  *num = *size = 0;    } -  + }      static void ba_low_alloc(struct block_allocator * a) {    if (a->l.offset) {