|
Blender
V2.59
|
00001 /* 00002 * 00003 * ***** BEGIN GPL LICENSE BLOCK ***** 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software Foundation, 00017 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00018 * 00019 * Contributor(s): Peter Schlaile <peter@schlaile.de> 2005 00020 * 00021 * ***** END GPL LICENSE BLOCK ***** 00022 */ 00023 00029 #ifndef MEM_CACHELIMITERC_API_H 00030 #define MEM_CACHELIMITERC_API_H 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00036 struct MEM_CacheLimiter_s; 00037 struct MEM_CacheLimiterHandle_s; 00038 00039 typedef struct MEM_CacheLimiter_s MEM_CacheLimiterC; 00040 typedef struct MEM_CacheLimiterHandle_s MEM_CacheLimiterHandleC; 00041 00042 /* function used to remove data from memory */ 00043 typedef void(*MEM_CacheLimiter_Destruct_Func)(void*); 00044 00045 #ifndef MEM_CACHELIMITER_H 00046 extern void MEM_CacheLimiter_set_maximum(int m); 00047 extern int MEM_CacheLimiter_get_maximum(void); 00048 #endif // MEM_CACHELIMITER_H 00049 00057 extern MEM_CacheLimiterC * new_MEM_CacheLimiter( 00058 MEM_CacheLimiter_Destruct_Func data_destructor); 00059 00068 extern void delete_MEM_CacheLimiter(MEM_CacheLimiterC * This); 00069 00077 extern MEM_CacheLimiterHandleC * MEM_CacheLimiter_insert( 00078 MEM_CacheLimiterC * This, void * data); 00079 00086 extern void MEM_CacheLimiter_enforce_limits(MEM_CacheLimiterC * This); 00087 00095 extern void MEM_CacheLimiter_unmanage(MEM_CacheLimiterHandleC * handle); 00096 00097 00104 extern void MEM_CacheLimiter_touch(MEM_CacheLimiterHandleC * handle); 00105 00113 extern void MEM_CacheLimiter_ref(MEM_CacheLimiterHandleC * handle); 00114 00122 extern void MEM_CacheLimiter_unref(MEM_CacheLimiterHandleC * handle); 00123 00130 extern int MEM_CacheLimiter_get_refcount(MEM_CacheLimiterHandleC * handle); 00131 00138 extern void * MEM_CacheLimiter_get(MEM_CacheLimiterHandleC * handle); 00139 00140 #ifdef __cplusplus 00141 } 00142 #endif 00143 00144 00145 #endif // MEM_CACHELIMITERC_API_H