Explorar o código

fix(allocator): allocate wrong size

greatbridf %!s(int64=2) %!d(string=hai) anos
pai
achega
f7bf58435d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      include/types/allocator.hpp

+ 1 - 1
include/types/allocator.hpp

@@ -19,7 +19,7 @@ public:
 
     static value_type* allocate_memory(size_t count)
     {
-        return static_cast<value_type*>(::k_malloc(sizeof(value_type) * count));
+        return static_cast<value_type*>(::k_malloc(count));
     }
 
     static void deallocate_memory(value_type* ptr)