Commit 2f2fb51d authored by Lindsay Knupp's avatar Lindsay Knupp
Browse files

init function done

parent ea851944
......@@ -7,13 +7,25 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include "allocator.h"
#include "dlist.h"
int allocator_init(size_t size){
free_list = dlist_create();
allocated_list = dlist_create();
free_list = malloc(size);
allocated_list = malloc(size);
// Check if lists successfully created
if (!(free_list || allocated_list) == 1) {
return -1;
}
return 0;
}
void *allocate(size_t size){
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment