Index: uspace/lib/cpp/include/exception
===================================================================
--- uspace/lib/cpp/include/exception	(revision a1aecb12e1acd6c228cecd2e91a411a9fb169a0c)
+++ uspace/lib/cpp/include/exception	(revision 374065606f967a3b637eafb8ec9383514387e5e6)
@@ -39,5 +39,5 @@
 		exception(const exception&) = default;
 		exception& operator=(const exception&) noexcept;
-		virtual const char *what() const;
+		virtual const char* what() const;
 		virtual ~exception() = default;
 };
Index: uspace/lib/cpp/include/new
===================================================================
--- uspace/lib/cpp/include/new	(revision a1aecb12e1acd6c228cecd2e91a411a9fb169a0c)
+++ uspace/lib/cpp/include/new	(revision 374065606f967a3b637eafb8ec9383514387e5e6)
@@ -41,18 +41,25 @@
 		bad_alloc(const bad_alloc&);
 		bad_alloc& operator=(const bad_alloc&) = default;
-		virtual const char *what() const override;
+		virtual const char* what() const override;
 		virtual ~bad_alloc() = default;
 };
-
-using new_handler = void (*)();
 
 struct nothrow_t {};
 extern const nothrow_t nothrow;
 
+using new_handler = void (*)();
+
+new_handler set_new_handler(new_handler);
+new_handler get_new_handler() noexcept;
+
 }
 
-void *operator new(std::size_t);
+void* operator new(std::size_t);
+void* operator new(std::size_t, const std::nothrow_t&) noexcept;
+void* operator new[](std::size_t);
+void* operator new[](std::size_t, const std::nothrow_t&) noexcept;
 
-void operator delete(void *);
+void operator delete(void* );
+void operator delete[](void* );
 
 #endif
Index: uspace/lib/cpp/src/exception.cpp
===================================================================
--- uspace/lib/cpp/src/exception.cpp	(revision a1aecb12e1acd6c228cecd2e91a411a9fb169a0c)
+++ uspace/lib/cpp/src/exception.cpp	(revision 374065606f967a3b637eafb8ec9383514387e5e6)
@@ -30,5 +30,5 @@
 namespace std
 {
-    const char *exception::what() const
+    const char* exception::what() const
     {
         return "std::exception";
Index: uspace/lib/cpp/src/new.cpp
===================================================================
--- uspace/lib/cpp/src/new.cpp	(revision a1aecb12e1acd6c228cecd2e91a411a9fb169a0c)
+++ uspace/lib/cpp/src/new.cpp	(revision 374065606f967a3b637eafb8ec9383514387e5e6)
@@ -31,5 +31,5 @@
 namespace std
 {
-    const char *bad_alloc::what() const
+    const char* bad_alloc::what() const
     {
         return "std::bad_alloc";
@@ -37,23 +37,75 @@
 
     const nothrow_t nothrow{};
+
+    static new_handler handler = nullptr;
+
+    new_handler set_new_handler(new_handler h)
+    {
+        auto old = handler;
+        handler = h;
+
+        return old;
+    }
+
+    new_handler get_new_handler() noexcept
+    {
+        return handler;
+    }
 }
 
-void *operator new(std::size_t size)
+void* operator new(std::size_t size)
 {
-    // TODO: Implement usage of std::new_handler.
     if (size == 0)
         size = 1;
 
     void *ptr = std::malloc(size);
-    // TODO: For this we need stack unwinding support.
-    /* if (!ptr) */
-    /*     throw std::bad_alloc{}; */
+
+    while (!ptr)
+    {
+        auto h = std::get_new_handler();
+        if (h)
+            h();
+        else
+        {
+            // TODO: For this we need stack unwinding support.
+            /*     throw std::bad_alloc{}; */
+        }
+    }
 
     return ptr;
 }
 
-void operator delete(void *ptr)
+void* operator new(std::size_t size, const std::nothrow_t& nt) noexcept
+{
+    void* ptr{nullptr};
+
+    try
+    {
+        ptr = ::operator new(size);
+    }
+    catch(...)
+    { /* DUMMY BODY */ }
+
+    return ptr;
+}
+
+void* operator new[](std::size_t size)
+{
+    return ::operator new(size);
+}
+
+void* operator new[](std::size_t size, const std::nothrow_t& nt) noexcept
+{
+    return ::operator new(size, nt);
+}
+
+void operator delete(void* ptr)
 {
     if (ptr)
         std::free(ptr);
 }
+
+void operator delete[](void* ptr)
+{
+    ::operator delete(ptr);
+}
