c++ application development #nrf52840


Narendar Malepu
 

Hi,

we are developing an application in c++, for dynamic memory allocation using new as operator overloading as below

void *operator new(size_t size)
{
  void *p = malloc(size);
  return p;
}
 
void operator delete(void *ptr)
{
  free(ptr);
}

but as per documentation it is mention that new and delete are not supported, complier is not showing any error or warning for my usage.

Can you help regarding above new operator overloading whether to use it or not in my application.

Thanks

Join devel@lists.zephyrproject.org to automatically receive all group messages.