[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:
@@ -25,11 +25,6 @@ public:
|
||||
|
||||
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:
|
||||
static void allocate_chunk()
|
||||
{
|
||||
|
||||
@@ -12,9 +12,6 @@ DEFINE_SLAB_ALLOCATOR(node_type, 1);
|
||||
|
||||
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->address = start;
|
||||
node->size = size;
|
||||
|
||||
Reference in New Issue
Block a user