The bblock_t object relies on the memory allocator zeroing out its
contents before it's initialized, which is quite an unusual practice
in the C++ world because it ties objects to some specific allocation
scheme, and gives unpredictable results when an object is created with
a different allocator -- Stack allocation, array allocation, or
aggregation inside a different object are some of the useful
possibilities that come to my mind. Initialize all fields from the
constructor and stop using the zeroing allocator.
v2: Use zero initialization for numeric types instead of default construction.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
return block;
}
-bblock_t::bblock_t()
+bblock_t::bblock_t() :
+ start_ip(0), end_ip(0), block_num(0)
{
start = NULL;
end = NULL;
class bblock_t {
public:
- DECLARE_RZALLOC_CXX_OPERATORS(bblock_t)
+ DECLARE_RALLOC_CXX_OPERATORS(bblock_t)
bblock_link *make_list(void *mem_ctx);