Skip to content

Instantly share code, notes, and snippets.

@vittorioromeo
Created October 3, 2014 09:11
Show Gist options
  • Save vittorioromeo/c080b03ee269ea171c83 to your computer and use it in GitHub Desktop.
Save vittorioromeo/c080b03ee269ea171c83 to your computer and use it in GitHub Desktop.
inline void * operator new(std::size_t n)
{
return malloc(n);
}
inline void operator delete(void * p) noexcept
{
free(p);
}
inline void *operator new[](std::size_t s)
{
return malloc(s);
}
inline void operator delete[](void *p) noexcept
{
free(p);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment