Generic Trace Generator (GTG)  0.1
GTGMemory.h
Go to the documentation of this file.
00001 
00009 #ifndef GTG_MEMORY_H
00010 #define GTG_MEMORY_H
00011 
00012 #include <stdlib.h>
00013 
00014 
00019 struct gtg_memory {
00020   void *first_mem;
00021   void *current_mem;
00022   size_t block_len;
00023   long mem_len;
00024   void *first_free;
00025   long first_new;
00026   long nb_allocated;
00027 };
00028 typedef struct gtg_memory *gtg_memory_t;
00029 
00038 void gtg_block_memory_init(gtg_memory_t *memory, size_t block_size, long initial_block_number);
00039 
00047 void* gtg_block_malloc(gtg_memory_t memory);
00048 
00057 void gtg_block_free(gtg_memory_t memory, void *ptr);
00058 
00059 #endif