分类: LINUX
2014-06-10 17:05:42
int hAlloc(void ***map)
功能:分配使用的map数组
说明:
-----------------------------------------------------------------------------------------------------------------
int hFree(void ***map, int handle)
功能:释放使用的map数组
说明:
-----------------------------------------------------------------------------------------------------------------
int hAllocEntry(void ***list, int *max, int size)
功能:Allocate an entry in the halloc array.
说明:
-----------------------------------------------------------------------------------------------------------------
int bopen(void *buf, int bufsize, int flags)
功能:初始化balloc模块,分配64k内存
说明:
-----------------------------------------------------------------------------------------------------------------
void bclose()
功能:关闭balloc模块,释放内存
说明:
-----------------------------------------------------------------------------------------------------------------
void *balloc(B_ARGS_DEC, int size)
功能:分配能容下size大小的最小的块,
说明:
-----------------------------------------------------------------------------------------------------------------
void bfree(B_ARGS_DEC, void *mp)
功能:释放balloc分配的内存空间
说明:
-----------------------------------------------------------------------------------------------------------------
void bfreeSafe(B_ARGS_DEC, void *mp)
功能:没啥用
说明:
-----------------------------------------------------------------------------------------------------------------
char *bstrdupA(B_ARGS_DEC, char *s)
功能:没啥用
说明:
-----------------------------------------------------------------------------------------------------------------
char_t *bstrdup(B_ARGS_DEC, char_t *s)
功能:分配内存,拷贝字符串
说明:
-----------------------------------------------------------------------------------------------------------------
void *brealloc(B_ARGS_DEC, void *mp, int newsize)
功能:扩大分配的内存空间
说明:
-----------------------------------------------------------------------------------------------------------------
static int ballocGetSize(int size, int *q)
功能:获得能容下size的最小的块的大小
说明:
Block classes are: 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192,
16384, 32768, 65536
-----------------------------------------------------------------------------------------------------------------
static void bFillBlock(void *buf, int bufsize)
功能:没啥用
说明:
-----------------------------------------------------------------------------------------------------------------
void bstats(int handle, void (*writefn)(int handle, char_t *fmt, ...))
功能:输出内存的统计信息
说明:
-----------------------------------------------------------------------------------------------------------------
static int bStatsFileSort(const void *cp1, const void *cp2)
功能:比较大小
说明:
-----------------------------------------------------------------------------------------------------------------
static void bStatsAlloc(B_ARGS_DEC, void *ptr, int q, int size)
功能:计算分配的统计信息
说明:
-----------------------------------------------------------------------------------------------------------------
static void bStatsFree(B_ARGS_DEC, void *ptr, int q, int size)
功能:释放统计信息
说明:
-----------------------------------------------------------------------------------------------------------------
static void bstatsWrite(int handle, char_t *fmt, ...)
功能:输出
说明:
-----------------------------------------------------------------------------------------------------------------
static void verifyUsedBlock(bType *bp, int q)
功能:校验使用中的块
说明:
-----------------------------------------------------------------------------------------------------------------
static void verifyFreeBlock(bType *bp, int q)
功能:校验未使用的块
说明:
-----------------------------------------------------------------------------------------------------------------
void verifyBallocSpace()
功能:校验分配的空间
说明:
-----------------------------------------------------------------------------------------------------------------
char_t *bstrdupNoBalloc(char_t *s)
功能:
说明:
-----------------------------------------------------------------------------------------------------------------