Skip to content
Snippets Groups Projects
Commit 3c030ff8 authored by 이은영's avatar 이은영
Browse files

save

parent 81530590
Branches
No related tags found
No related merge requests found
#ifndef _ALLOC_H_ #ifndef _ALLOC_H_
#define _ALLOC_H_ #define _ALLOC_H_
#include <sys/types.h>
#define META_SIZE (sizeof(struct metadata) - 4)
#define F 0 // first
#define B 1 // best
#define W 2 // worst
typedef struct meta_struct { typedef struct meta_struct {
size_t size;
int free;
char data[1];
meta prev;
meta next;
} meta; // meta
extern void *b; // base
extern int fitff; // fit case
} meta; void* m_malloc(size_t size);
void m_free(void* ptr);
void* m_realloc(void* ptr, size_t size);
meta find_meta(p_meta *last, size_t size);
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment