Index: uspace/lib/cpp/include/impl/memory.hpp
===================================================================
--- uspace/lib/cpp/include/impl/memory.hpp	(revision bfc972ed291255d220c32e502dd15b876c99e8d6)
+++ uspace/lib/cpp/include/impl/memory.hpp	(revision 08c1df0ee23ab6bd5fc18d56eaf8cfc415159c85)
@@ -36,4 +36,5 @@
 #include <internal/memory/type_getters.hpp>
 #include <iterator>
+#include <limits>
 #include <new>
 #include <type_traits>
@@ -131,22 +132,19 @@
         using allocator_type = Alloc;
 
-        using value_type = typename Alloc::value_type;
-        using pointer = typename aux::get_pointer<Alloc>::type;
-        using const_pointer = typename aux::get_const_pointer<Alloc, pointer>::type;
-        // TODO: fix void pointer typedefs
-        /* using void_pointer = typename aux::get_void_pointer<Alloc, pointer>::type; */
-        /* using const_void_pointer = typename aux::get_const_void_pointer<Alloc, pointer>::type; */
-        using void_pointer = void*;
-        using const_void_pointer = const void*;
-        using difference_type = typename aux::get_difference_type<Alloc, pointer>::type;
-        using size_type = typename aux::get_size_type<Alloc, difference_type>::type;
-
-        using propagate_on_container_copy_assignment = typename aux::get_copy_propagate<Alloc>::type;
-        using propagate_on_container_move_assignment = typename aux::get_move_propagate<Alloc>::type;
-        using propagate_on_container_swap = typename aux::get_swap_propagate<Alloc>::type;
-        using is_always_equal = typename aux::get_always_equal<Alloc>::type;
+        using value_type         = typename Alloc::value_type;
+        using pointer            = typename aux::alloc_get_pointer<Alloc>::type;
+        using const_pointer      = typename aux::alloc_get_const_pointer<Alloc, pointer>::type;
+        using void_pointer       = typename aux::alloc_get_void_pointer<Alloc, pointer>::type;
+        using const_void_pointer = typename aux::alloc_get_const_void_pointer<Alloc, pointer>::type;
+        using difference_type    = typename aux::alloc_get_difference_type<Alloc, pointer>::type;
+        using size_type          = typename aux::alloc_get_size_type<Alloc, difference_type>::type;
+
+        using propagate_on_container_copy_assignment = typename aux::alloc_get_copy_propagate<Alloc>::type;
+        using propagate_on_container_move_assignment = typename aux::alloc_get_move_propagate<Alloc>::type;
+        using propagate_on_container_swap            = typename aux::alloc_get_swap_propagate<Alloc>::type;
+        using is_always_equal                        = typename aux::alloc_get_always_equal<Alloc>::type;
 
         template<class T>
-        using rebind_alloc = typename aux::get_rebind_args<Alloc, T>;
+        using rebind_alloc = typename aux::alloc_get_rebind_alloc<Alloc, T>;
 
         template<class T>
@@ -159,6 +157,9 @@
 
         static pointer allocate(Alloc& alloc, size_type n, const_void_pointer hint)
-        { // TODO: this when it's well formed, otherwise alloc.allocate(n)
-            return alloc.allocate(n, hint);
+        {
+            if constexpr (aux::alloc_has_hint_allocate<Alloc, size_type, const_void_pointer>::value)
+                return alloc.allocate(n, hint);
+            else
+                return alloc.allocate(n);
         }
 
@@ -171,6 +172,8 @@
         static void construct(Alloc& alloc, T* ptr, Args&&... args)
         {
-            // TODO: why wasn't this implemented? check standard for remarks
-            alloc.construct(ptr, forward<Args>(args)...);
+            if constexpr (aux::alloc_has_construct<Alloc, T, Args...>::value)
+                alloc.construct(ptr, forward<Args>(args)...);
+            else
+                ::new(static_cast<void*>(ptr)) T(forward<Args>(args)...);
         }
 
@@ -178,17 +181,24 @@
         static void destroy(Alloc& alloc, T* ptr)
         {
-            // TODO: implement
+            if constexpr (aux::alloc_has_destroy<Alloc, T>::value)
+                alloc.destroy(ptr);
+            else
+                ptr->~T();
         }
 
         static size_type max_size(const Alloc& alloc) noexcept
         {
-            // TODO: implement
-            return 0;
+            if constexpr (aux::alloc_has_max_size<Alloc>::value)
+                return alloc.max_size();
+            else
+                return numeric_limits<size_type>::max();
         }
 
         static Alloc select_on_container_copy_construction(const Alloc& alloc)
         {
-            // TODO: implement
-            return Alloc{};
+            if constexpr (aux::alloc_has_select<Alloc>::value)
+                return alloc.select_on_container_copy_construction();
+            else
+                return alloc;
         }
     };
@@ -246,7 +256,5 @@
             template<class U>
             allocator(const allocator<U>&) noexcept
-            {
-                // TODO: implement
-            }
+            { /* DUMMY BODY */ }
 
             ~allocator() = default;
@@ -262,11 +270,6 @@
             }
 
-            pointer allocate(size_type n, allocator<void>::const_pointer hint = 0)
-            {
-                /**
-                 * Note: The usage of hint is unspecified.
-                 *       TODO: Check HelenOS hint allocation capabilities.
-                 * TODO: assert that n < max_size()
-                 */
+            pointer allocate(size_type n, allocator<void>::const_pointer = 0)
+            {
                 return static_cast<pointer>(::operator new(n * sizeof(value_type)));
             }
@@ -278,6 +281,6 @@
 
             size_type max_size() const noexcept
-            { // TODO: implement, max argument to allocate
-                return 0xFFFFFFFF;
+            {
+                return numeric_limits<size_type>::max();
             }
 
