3 * ¥½¡¼¥¹¥³¡¼¥ÉÃæ¤Ç¤Ïator¤Èά¤¹¤ë¤³¤È¤¬¤¢¤ë
5 #ifndef _alloc_h_included_
6 #define _alloc_h_included_
8 /** ¥¢¥í¥±¡¼¥¿¤Î¥Ï¥ó¥É¥ë */
9 typedef struct allocator_priv * allocator;
13 * s: ¹½Â¤ÂΤÎsize(¥Ð¥¤¥È¿ô)
14 * dtor: =destructor ³ÎÊݤ·¤¿¥ª¥Ö¥¸¥§¥¯¥È¤¬²òÊü¤µ¤ì¤ë¤È¤¤Ë¸Æ¤Ð¤ì¤ë´Ø¿ô
15 * dtor¤Î°ú¿ô¤Ï²òÊü¤µ¤ì¤ë¥ª¥Ö¥¸¥§¥¯¥È
16 * ÊÖ¤êÃÍ: ºîÀ®¤·¤¿allocator
18 allocator anthy_create_allocator(int s, void (*dtor)(void *));
22 * ¤³¤ÎºÝ¤Ë¡¢¤³¤Îallocator¤«¤é³ÎÊݤµ¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¤ÏÁ´¤Æ²òÊü¤µ¤ì¤ë
23 * a: ²òÊü¤¹¤ëallocator
25 void anthy_free_allocator(allocator a);
28 * ¥ª¥Ö¥¸¥§¥¯¥È¤ò³ÎÊݤ¹¤ë
30 * ÊÖ¤êÃÍ: ³ÎÊݤ·¤¿¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¢¥É¥ì¥¹
32 void *anthy_smalloc(allocator a);
34 * ¥ª¥Ö¥¸¥§¥¯¥È¤ò²òÊü¤¹¤ë
36 * p: ²òÊü¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¢¥É¥ì¥¹
38 void anthy_sfree(allocator a, void *p);
40 /* Á´¤Æ¤Îallocator¤òÇË´þ¤¹¤ë */
41 void anthy_quit_allocator(void);