2 #ifndef __OSI_MCAS_OBJ_CACHE_H
3 #define __OSI_MCAS_OBJ_CACHE_H
5 #include "../mcas/portable_defns.h"
6 #include "../mcas/ptst.h"
7 #include "../mcas/gc.h"
9 typedef int osi_mcas_obj_cache_t;
11 /* Create a new MCAS GC pool, and return its identifier, which
12 * follows future calls */
13 void osi_mcas_obj_cache_create(osi_mcas_obj_cache_t * gc_id, size_t size); /* alignment? */
15 /* Allocate an object from the pool identified by
17 void *osi_mcas_obj_cache_alloc(osi_mcas_obj_cache_t gc_id);
19 /* Release object obj to its GC pool, identified by
21 void osi_mcas_obj_cache_free(osi_mcas_obj_cache_t gc_id, void *obj);
23 /* Terminate an MCAS GC pool */
24 void osi_mcas_obj_cache_destroy(osi_mcas_obj_cache_t gc_id);
26 #endif /* __OSI_MCAS_OBJ_CACHE_H */