Select Git revision
Forked from
HyukSang Kwon / 1801_OS_assignment4
Source project has a limited visibility.
-
Hywon woong Jang authoredHywon woong Jang authored
alloc.h 670 B
#ifndef _ALLOC_H_
#define _ALLOC_H_
#include <unistd.h>
#include <stdio.h>
#include <string.h>
typedef struct meta_struct {
struct meta_struct * prev;
struct meta_struct * next;
unsigned int free;
unsigned int size;
} meta;
typedef struct meta_manage {
meta * Head;
meta * Tail;
} manage;
manage META;
void * m_malloc(size_t size);
void * m_realloc(void *ptr , size_t size);
void * m_free (void * ptr);
void set_link(void);
int m_search(meta *ptr);
meta * search_and_split(size_t size);
void print_link(void);
void split_block(meta * temp, unsigned int new_size);
void * re_allocate(void *ptr, meta *temp, size_t new_size);
void reverse_print(void);
#endif