⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mem0dbg.h

📁 这是linux下运行的mysql软件包,可用于linux 下安装 php + mysql + apach 的网络配置
💻 H
字号:
/******************************************************The memory management: the debug code. This is not a compilation module,but is included in mem0mem.* !(c) 1994, 1995 Innobase OyCreated 6/9/1994 Heikki Tuuri*******************************************************//* In the debug version each allocated field is surrounded withcheck fields whose sizes are given below */#ifdef UNIV_MEM_DEBUG#define MEM_FIELD_HEADER_SIZE   ut_calc_align(2 * sizeof(ulint),\						UNIV_MEM_ALIGNMENT)#define MEM_FIELD_TRAILER_SIZE  sizeof(ulint)#else#define MEM_FIELD_HEADER_SIZE   0#endif/* Space needed when allocating for a user a field oflength N. The space is allocated only in multiples ofUNIV_MEM_ALIGNMENT. In the debug version there are alsocheck fields at the both ends of the field. */#ifdef UNIV_MEM_DEBUG#define MEM_SPACE_NEEDED(N) ut_calc_align((N) + MEM_FIELD_HEADER_SIZE\			       	              + MEM_FIELD_TRAILER_SIZE,\				          UNIV_MEM_ALIGNMENT)#else#define MEM_SPACE_NEEDED(N) ut_calc_align((N), UNIV_MEM_ALIGNMENT)#endif/*******************************************************************Checks a memory heap for consistency and prints the contents if requested.Outputs the sum of sizes of buffers given to the user (only inthe debug version), the physical size of the heap and the number ofblocks in the heap. In case of error returns 0 as sizes and numberof blocks. */voidmem_heap_validate_or_print(/*=======================*/	mem_heap_t*   	heap, 	/* in: memory heap */	byte*		top,	/* in: calculate and validate only until				this top pointer in the heap is reached,				if this pointer is NULL, ignored */	ibool            print,  /* in: if TRUE, prints the contents				of the heap; works only in				the debug version */	ibool*           error,  /* out: TRUE if error */	ulint*          us_size,/* out: allocated memory 				(for the user) in the heap,				if a NULL pointer is passed as this				argument, it is ignored; in the				non-debug version this is always -1 */	ulint*          ph_size,/* out: physical size of the heap,				if a NULL pointer is passed as this				argument, it is ignored */	ulint*          n_blocks); /* out: number of blocks in the heap,				if a NULL pointer is passed as this				argument, it is ignored */#ifdef UNIV_MEM_DEBUG/******************************************************************Prints the contents of a memory heap. */voidmem_heap_print(/*===========*/	mem_heap_t*   heap);	/* in: memory heap */#endif /* UNIV_MEM_DEBUG *//******************************************************************Checks that an object is a memory heap (or a block of it) */iboolmem_heap_check(/*===========*/				/* out: TRUE if ok */	mem_heap_t*   heap);	/* in: memory heap *//******************************************************************Validates the contents of a memory heap. */iboolmem_heap_validate(/*==============*/				/* out: TRUE if ok */	mem_heap_t*   heap);	/* in: memory heap */#ifdef UNIV_MEM_DEBUG/*********************************************************************TRUE if no memory is currently allocated. */iboolmem_all_freed(void);/*===============*/			/* out: TRUE if no heaps exist *//*********************************************************************Validates the dynamic memory */iboolmem_validate_no_assert(void);/*=========================*/			/* out: TRUE if error *//****************************************************************Validates the dynamic memory */iboolmem_validate(void);/*===============*/			/* out: TRUE if ok */#endif /* UNIV_MEM_DEBUG *//****************************************************************Tries to find neigboring memory allocation blocks and dumps to stderrthe neighborhood of a given pointer. */voidmem_analyze_corruption(/*===================*/	byte*	ptr);	/* in: pointer to place of possible corruption *//*********************************************************************Prints information of dynamic memory usage and currently allocated memoryheaps or buffers. Can only be used in the debug version. */voidmem_print_info(void);/*================*//*********************************************************************Prints information of dynamic memory usage and currently allocated memoryheaps or buffers since the last ..._print_info or..._print_new_info. */voidmem_print_new_info(void);/*====================*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -