Anything that has an aligned field will also need to be aligned (otherwise the field alignment won't be respected). You can do it by inheriting from CacheLinedAlign which includes an operator new (see comment in aligned-new.h).
On Wed, Feb 14, 2018 at 12:33 PM, Sailesh Mukil <sail...@cloudera.com> wrote: > Does anyone have experience with fixing the following type of > clang-tidy warning? > > > /home/ubuntu/Impala/be/src/runtime/exec-env.cc:159:21: warning: type > 'impala::QueryExecMgr' requires 64 bytes of alignment and the default > allocator only guarantees 16 bytes [clang-diagnostic-over-aligned] > query_exec_mgr_(new QueryExecMgr()), > > > /home/ubuntu/Impala/be/src/service/impalad-main.cc:80:49: warning: > type 'impala::ImpalaServer' requires 64 bytes of alignment and the > default allocator only guarantees 16 bytes > [clang-diagnostic-over-aligned] > boost::shared_ptr<ImpalaServer> impala_server(new > ImpalaServer(&exec_env)); >