00001 /* 00002 * File: 00003 * mod_mem.h 00004 * Author(s): 00005 * Pascal Felber <pascal.felber@unine.ch> 00006 * Description: 00007 * Module for dynamic memory management. 00008 * 00009 * Copyright (c) 2007-2009. 00010 * 00011 * This program is free software; you can redistribute it and/or 00012 * modify it under the terms of the GNU General Public License 00013 * as published by the Free Software Foundation, version 2 00014 * of the License. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 */ 00021 00035 #ifndef _MOD_MEM_H_ 00036 # define _MOD_MEM_H_ 00037 00038 # include "stm.h" 00039 00040 # ifdef __cplusplus 00041 extern "C" { 00042 # endif 00043 00053 void *stm_malloc(TXPARAMS size_t size); 00054 00067 void stm_free(TXPARAMS void *addr, size_t size); 00068 00083 void stm_free2(TXPARAMS void *addr, size_t idx, size_t size); 00084 00094 void mod_mem_init(int gc); 00095 00096 # ifdef __cplusplus 00097 } 00098 # endif 00099 00100 #endif /* _MOD_MEM_H_ */