diff --git a/easy_profiler_core/profile_manager.h b/easy_profiler_core/profile_manager.h index b3434d5..14209ff 100644 --- a/easy_profiler_core/profile_manager.h +++ b/easy_profiler_core/profile_manager.h @@ -56,6 +56,7 @@ The Apache License, Version 2.0 (the "License"); #include #include #include +#include ////////////////////////////////////////////////////////////////////////// @@ -177,7 +178,7 @@ class chunk_allocator auto prev = last; last = ::new (EASY_MALLOC(sizeof(chunk), EASY_ALIGNMENT_SIZE)) chunk(); last->prev = prev; - *(uint16_t*)last->data = 0; + std::memset(last->data, 0, sizeof(uint16_t)); } /** Invert current chunks list to enable to iterate over chunks list in direct order.