Browse Source

Added freelist header

main
Titouan Rigoudy 11 years ago
parent
commit
6b02e70f72
1 changed files with 39 additions and 0 deletions
  1. +39
    -0
      ya_freelist.h

+ 39
- 0
ya_freelist.h View File

@ -0,0 +1,39 @@
/*
* Yet Another Malloc
* ya_freelist.h
*/
#ifndef YA_FREELIST_H
#define YA_FREELIST_H
/*----------*/
/* Includes */
/*----------*/
#include <stdint.h> // for intptr_t
/*------------*/
/* Data types */
/*------------*/
struct fl {
intptr_t *block;
struct fl *prev;
struct fl *next;
};
/*--------------*/
/* Declarations */
/*--------------*/
struct fl *fl_find(intptr_t min_size);
void fl_split(struct fl *fl);
void fl_join_prev(struct fl *fl);
void fl_join_next(struct fl *fl);
void fl_join(struct fl *fl);
#endif

Loading…
Cancel
Save