[kutil] Remove ctor workaround in slab_allocated

Before global constructors were working, I had added a hack to zero out
the static vector member of in `slab_allocated`. Now that they are
working, this can be removed.
This commit is contained in:
Justin C. Miller
2020-06-01 00:36:34 -07:00
parent 2125f043b6
commit ea2a3e6f16
2 changed files with 0 additions and 8 deletions

View File

@@ -25,11 +25,6 @@ public:
void operator delete(void *p) { s_free.append(reinterpret_cast<T*>(p)); } void operator delete(void *p) { s_free.append(reinterpret_cast<T*>(p)); }
// TODO: get rid of this terribleness
static void hacky_init_remove_me() {
memset(&s_free, 0, sizeof(s_free));
}
private: private:
static void allocate_chunk() static void allocate_chunk()
{ {

View File

@@ -12,9 +12,6 @@ DEFINE_SLAB_ALLOCATOR(node_type, 1);
vm_space::vm_space(uintptr_t start, size_t size) vm_space::vm_space(uintptr_t start, size_t size)
{ {
// TODO: replace this with real global ctor
slab_allocated<node_type>::hacky_init_remove_me();
node_type *node = new node_type; node_type *node = new node_type;
node->address = start; node->address = start;
node->size = size; node->size = size;