- size_t malloc_info_bytesize =
- (this->heap->heaplimit + 1) * sizeof(malloc_info);
- this->heap_info = (malloc_info*) realloc(this->heap_info, malloc_info_bytesize);
- this->read_bytes(this->heap_info, malloc_info_bytesize,
+ size_t count = this->heap->heaplimit + 1;
+ if (this->heap_info.size() < count)
+ this->heap_info.resize(count);
+ this->read_bytes(this->heap_info.data(), count * sizeof(malloc_info),