RetroArch
btmemb.h
Go to the documentation of this file.
1 #ifndef __BTMEMB_H__
2 #define __BTMEMB_H__
3 
4 #include <gctypes.h>
5 
6 #define MEMB(name,size,num) \
7  static u8 memb_mem_##name[(MEM_ALIGN_SIZE(size)+sizeof(u32))*num]; \
8  static struct memb_blks name = {size,num,memb_mem_##name}
9 
10 struct memb_blks {
11  u16 size;
12  u16 num;
13  u8 *mem;
14 };
15 
16 void btmemb_init(struct memb_blks *blk);
17 void* btmemb_alloc(struct memb_blks *blk);
18 u8 btmemb_free(struct memb_blks *blk,void *ptr);
19 u8 btmemb_ref(struct memb_blks *blk,void *ptr);
20 
21 #endif
const GLvoid * ptr
Definition: nx_glsym.h:242
Data type definitions.
Definition: memb.h:10
u16 size
Definition: memb.h:11
u8 btmemb_ref(struct memb_blks *blk, void *ptr)
Definition: btmemb.c:59
u8 btmemb_free(struct memb_blks *blk, void *ptr)
Definition: btmemb.c:37
uint16_t u16
16bit unsigned integer
Definition: gctypes.h:18
u8 * mem
Definition: memb.h:13
void * btmemb_alloc(struct memb_blks *blk)
Definition: btmemb.c:15
u16 num
Definition: memb.h:12
uint8_t u8
8bit unsigned integer
Definition: gctypes.h:17
void btmemb_init(struct memb_blks *blk)
Definition: btmemb.c:10