-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathosi_mcas_obj_cache.h
More file actions
36 lines (26 loc) · 974 Bytes
/
osi_mcas_obj_cache.h
File metadata and controls
36 lines (26 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef __OSI_MCAS_OBJ_CACHE_H
#define __OSI_MCAS_OBJ_CACHE_H
#include "portable_defns.h"
#include "gc.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef int osi_mcas_obj_cache_t;
/* Create a new MCAS GC pool, and return its identifier, which
* follows future calls */
void osi_mcas_obj_cache_create(gc_global_t *, osi_mcas_obj_cache_t *,
size_t size, const char *tag); /* alignment? */
/* Allocate an object from the pool identified by
* gc_id */
void *osi_mcas_obj_cache_alloc(gc_global_t *, osi_mcas_obj_cache_t);
void *osi_mcas_obj_cache_alloc_critical(ptst_t *, osi_mcas_obj_cache_t);
/* Release object obj to its GC pool, identified by
* gc_id */
void osi_mcas_obj_cache_free(gc_global_t *, osi_mcas_obj_cache_t, void *);
void osi_mcas_obj_cache_free_alloc(ptst_t *, osi_mcas_obj_cache_t, void *);
/* Terminate an MCAS GC pool */
void osi_mcas_obj_cache_destroy(osi_mcas_obj_cache_t gc_id);
#ifdef __cplusplus
}
#endif
#endif /* __OSI_MCAS_OBJ_CACHE_H */