38 lines
No EOL
610 B
C
38 lines
No EOL
610 B
C
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#define KCACHE_NAME_LEN 5
|
|
|
|
|
|
struct ma_bufctrl {
|
|
struct ma_bufctrl *next;
|
|
size_t *startaddr;
|
|
};
|
|
|
|
|
|
struct ma_slab {
|
|
struct ma_slab *next;
|
|
struct ma_slab *prev;
|
|
|
|
struct ma_bufctrl *buf_list;
|
|
|
|
uint32_t refcount;
|
|
|
|
};
|
|
|
|
struct ma_kcache {
|
|
struct ma_kcache *next;
|
|
struct ma_kcache *prev;
|
|
|
|
uint32_t objsize;
|
|
uint32_t flags;
|
|
uint32_t num;
|
|
|
|
struct ma_slab *slabs_free;
|
|
struct ma_slab *slabs_partial;
|
|
struct ma_slab *slabs_used;
|
|
|
|
struct ma_bufctrl *bufctrl_arr;
|
|
|
|
char name[KCACHE_NAME_LEN];
|
|
}; |