diff --git a/kernel/src/CppLib/Vector.hpp b/kernel/src/CppLib/Vector.hpp index 94e67de..3188084 100644 --- a/kernel/src/CppLib/Vector.hpp +++ b/kernel/src/CppLib/Vector.hpp @@ -69,38 +69,4 @@ namespace kcp } }; - - template - class noHeapVector : public vector { - size_t pages = 0; -public: - noHeapVector() { - // We shouldn't have used KernelOutStream in this constructor, will crash if used in a global object - // due to global constructors - - // kout << "NoMallocVector: constructor called" << Kt::newline; - pages = 0; - this->sz = 0; - this->array = nullptr; - } - - size_t push_back(T value) { - size_t _sz = this->sz; - - if ((this->pages * 0x1000) <= (sizeof(T) * this->sz)) { - if (Memory::g_pfa != nullptr) { - this->array = (T *)Memory::g_pfa->ReallocConsecutive(this->array, pages + 1); - pages++; - } - else - { - Panic("kcp::NoMallocVector used when Memory::g_pfa is not initialized!", nullptr); - } - } - - this->array[this->sz++] = value; - - return _sz; - } - }; }; \ No newline at end of file