亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? debugmem.c

?? 類PASCAL語言的編譯器,LINUX環境的,我沒試過是否正確.
?? C
字號:
#ifdef RCSstatic char rcsid[] = "$Id: debugmem.c,v 1.2 1996/02/29 14:10:50 dast Exp $";#endif/****************************************************************************** *                        FRONTEC RAILWAY SYSTEMS AB * ---------------------------------------------------------------------------- * * Project: FR-3000 CS * $Source: /home/pop/proj/rail/usr/dast/dancer/dancer/RCS/debugmem.c,v $ * $Revision: 1.2 $ * $Date: 1996/02/29 14:10:50 $ * $Author: dast $ * $State: Exp $ * $Locker:  $ * * ---------------------------------------------------------------------------- * $Log: debugmem.c,v $ * Revision 1.2  1996/02/29 14:10:50  dast * small change * * Revision 1.1  1996/01/18 12:32:11  dast * Initial revision * * Revision 3.7  1994/11/30  08:58:22  dast * Fixed a bug in the header * *****************************************************************************/ #include <stdio.h>#include <string.h>#include <stdlib.h>#ifdef AMIGA#include <exec/types.h>#include <exec/memory.h>#include <proto/exec.h>#endif#include "debugmem.h"/*#undef malloc#undef free*/static int bytes_alloc_I=0;static struct DebugMem *MallocKey =NULL;static char Verbose=0;struct DebugMem {	struct DebugMem *prev;	struct DebugMem *next;	int size_I;#ifdef SOURCE_INFO	char *source_PC;	int line_I;#endif};void UnLinkMemory( struct DebugMem * );void LinkMemory ( struct DebugMem * );/*************************************************************************** Function   : DBG_realloc* Purpose    : Debug version of the system function realloc()* Parameters : memory pointer, new size, source file, line number* Returns    : new allocation or NULL if failed*****************************************************************************/void * DBG_realloc( OldBuf_P, size_I, source_PC, line_I )	 void *		OldBuf_P;	 int	 	size_I;		 char *		source_PC;	 int		line_I;{	struct DebugMem *debug_PS;	void	*NewBuf_P;	if ( OldBuf_P == NULL )		/* *NOT* ANSI return!!! */		return DBG_malloc( size_I, source_PC, line_I );	debug_PS = (struct DebugMem *)		((char *) OldBuf_P - sizeof( struct DebugMem ) - PRE_COOKIE_SIZE);#if 0    /* this code prevents reallocing to less size */	if ( size_I <= debug_PS->size_I )		return OldBuf_P;#endif    if ( (NewBuf_P = DBG_malloc( size_I, source_PC, line_I )) == NULL )		return NULL;	memcpy( NewBuf_P, OldBuf_P, debug_PS->size_I );	DBG_free( OldBuf_P, source_PC, line_I );	return NewBuf_P;}/***************************************************************************** Function   : DBG_Verbose* Purpose    : Switch on verbose mode for debugging* Parameters : TRUE/FALSE* Returns    : none******************************************************************************/void DBG_Verbose (char verbose_C){	Verbose = verbose_C;}/*************************************************************************** Function   : DBG_calloc* Purpose    : Add debug level to the system function calloc()* Parameters : number of itmes, itemsize, source file, line* Returns    : allocated [cleared] memory or NULL if failed***********************************************************************/void * DBG_calloc ( items_I, itemsize_I, source_PC, line_I )	 int	 	items_I;	 int	 	itemsize_I;	 char *		source_PC;	 int		line_I;{  int size_I = items_I * itemsize_I;  void *mem = DBG_malloc(size_I, source_PC, line_I);  if(mem)    memset(mem, 0, size_I); /* clear it */  return mem;}/*************************************************************************** Function   : DBG_malloc* Purpose    : Add debug level to the system function malloc()* Parameters : size, source file, line* Returns    : allocated memory or NULL if failed***********************************************************************/void * DBG_malloc ( size_I, source_PC, line_I )	 int	 	size_I;		 char *		source_PC;	 int		line_I;{	struct DebugMem *debug_PS;	void *p;	/* Get some extra memory to make room for an extra	   integer storage to store the malloc()'ed size! */#ifdef AMIGA	debug_PS = (struct DebugMem *) _MALLOC( size_I +						  sizeof( struct DebugMem ) +						  PRE_COOKIE_SIZE +						  POST_COOKIE_SIZE, MEMF_ANY );#else
	debug_PS = (struct DebugMem *) _MALLOC( size_I +
						  sizeof( struct DebugMem ) +
						  PRE_COOKIE_SIZE +
						  POST_COOKIE_SIZE );
#endif
	if ( !debug_PS )		return NULL;		if(Verbose) {		MALLOCED(size_I, source_PC, line_I);	}	/* The malloc() did succeed */	debug_PS->size_I = size_I ; /* remember size of malloc() */	bytes_alloc_I += size_I ; /* count the malloc()s */	LinkMemory( debug_PS );	#ifdef SOURCE_INFO	debug_PS->source_PC = source_PC;	debug_PS->line_I    = line_I;#endif	#if PRE_COOKIE_SIZE > 0	memset((char*)debug_PS + sizeof( struct DebugMem ), PRE_COOKIE_FILL_BYTE,		   PRE_COOKIE_SIZE);#endif	#if POST_COOKIE_SIZE > 0	memset((char*)debug_PS + sizeof( struct DebugMem ) + size_I + PRE_COOKIE_SIZE,		   POST_COOKIE_FILL_BYTE, POST_COOKIE_SIZE);#endif		p = (char*)debug_PS + sizeof( struct DebugMem ) + PRE_COOKIE_SIZE;		return p;}/******************************************************************** * * Function   : DBG_free * Purpose    : Add debug level to the system function free() * Parameters : memory pointer, source file, source line * Returns    : none * ***********************************************************************/void DBG_free ( mem_P,#ifdef FREE_WITH_SIZE                size_I,#endif                source_PC, line_I )	 void *		mem_P;#ifdef FREE_WITH_SIZE         int		size_I;#endif	 char *		source_PC;	 int		line_I;{	struct DebugMem *debug_PS;	if( !mem_P) {#ifdef LOG		Logf("DEBUG", "Freeing NULL pointer at %s line %d\n",		     source_PC, line_I);#endif		return;	}	debug_PS = (struct DebugMem *)		((char *) mem_P - sizeof( struct DebugMem ) - PRE_COOKIE_SIZE);	DBG__CheckMem(mem_P, source_PC, line_I);	bytes_alloc_I -= debug_PS->size_I;	if(Verbose) {		FREED(debug_PS->size_I, source_PC, line_I);	}	UnLinkMemory( debug_PS );#ifdef FREE_WITH_SIZE	FREE_WITH_SIZE( debug_PS, size_I );#else	_FREE( debug_PS );#endif}/*************************************************************************** * * Function   : DBG_UsedMem * Purpose    : Return number of allocated bytes. * Parameters : none * Returns    : Number of bytes * ***************************************************************************/int DBG_UsedMem( ){	return bytes_alloc_I;}/************************************************************************* * * Function   : DBG__CheckMem * Purpose    : Check the cookies around the memory allocation for overwritten *              memory areas! * Parameters : memory pointer, source file, source line * ***************************************************************************/long DBG__CheckMem ( mem_P, source_PC, line_I )	 void *		mem_P;	 char *		source_PC;	 int		line_I;{	struct DebugMem *debug_PS;	int		a, b, c;	debug_PS = (struct DebugMem *)		((char *) mem_P - sizeof( struct DebugMem ) - PRE_COOKIE_SIZE);#if PRE_COOKIE_SIZE > 0	for(a=b=0; a<PRE_COOKIE_SIZE; a++)		if( *((unsigned char *)mem_P - PRE_COOKIE_SIZE + a ) != PRE_COOKIE_FILL_BYTE )			b++;	if ( b ) {		PRE_COOKIE_ACTION(b, source_PC, line_I						  , debug_PS->source_PC, debug_PS->line_I						  );	}#endif#if POST_COOKIE_SIZE > 0	for(a=c=0; a<POST_COOKIE_SIZE; a++)		if(*((unsigned char *)mem_P + debug_PS->size_I + a) != POST_COOKIE_FILL_BYTE)			c++;	if ( c ) {		POST_COOKIE_ACTION(c, source_PC, line_I, debug_PS->source_PC, debug_PS->line_I );	}#endif	if(Verbose) {		CHECKMEMED(debug_PS->size_I, source_PC, line_I);	}	return b + c;}/*************************************************************************** * * Function   : DBG_Strdup * Purpose    : Replaces the system strdup() function for debugging. * Parameters : string, source file, source line * Returns    : Allocated string or NULL if failed * **************************************************************************/char *DBG_Strdup(char *string_PC, char *source_PC, int line_I){	int len   = strlen( string_PC );	char *ptr = DBG_malloc( len+1, source_PC, line_I );	if(ptr)		strcpy(ptr, string_PC);	return ptr;}/************************************************************************* * * Function   : DBG_MemList * Purpose    : Display all allocations on stdout! * Parameters : none * Returns    : none * *************************************************************************/void DBG_MemList(){	struct 	DebugMem *point = MallocKey;		printf("------> Total %d bytes <------\n",		   DBG_UsedMem());		while(point) {		printf("source: %s line: %d size: %d\n",			   point->source_PC,			   point->line_I,			   point->size_I);		point = point->prev;	} 	printf("------> End of table <------\n");}/********************************************************************** * * Function   : LinkMemory * Purpose    : Link a memory pointer to the linked list of memory. * Parameters : (struct DebugMem *) to the memory to add * Returns    : none * ************************************************************************/void LinkMemory(point)	 struct DebugMem *point;{	point->prev=MallocKey;	 /* previous */	point->next=NULL;		 /* next */	if(MallocKey)		point->prev->next=point;	MallocKey = (void *)point;}/********************************************************************** * * Function   : UnLinkMemory * Purpose    : Remove a memory area from the linked list. * Parameters : (struct DebugMem *) to the area to remove * Returns    : none * ************************************************************************/void UnLinkMemory(point)	 struct DebugMem *point;{	if(MallocKey==point) {		/* if this is the last Malloc, set `last' to `prev' */		MallocKey=point->prev;		if(MallocKey)			MallocKey->next=NULL;	} else {		/* point the previous' `next' to our `next', and our next `previous'		   to our `previous'. Unlink us from the chain */		if(point->prev)			/* only if we aren't the _first_ Malloc() ! */			point->prev->next=point->next;		if(point->next)			/* only if there is a next! */			point->next->prev=point->prev;	}}/*********************************************************************** * * Function   : FreeAll * Purpose    : Free all memory areas in the list * Parameters : none * Returns    : none * *************************************************************************/void FreeAll(){	struct DebugMem *point;	struct DebugMem *prev;	if(!MallocKey)		return;			do {		point = MallocKey;				prev = point->prev;				free(point);	} while(MallocKey = prev);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕亚洲区| 国产精品羞羞答答xxdd| 极品销魂美女一区二区三区| 成人听书哪个软件好| 欧美巨大另类极品videosbest| 国产肉丝袜一区二区| 日韩国产欧美三级| 在线这里只有精品| 国产欧美一区二区三区在线看蜜臀 | 欧美日韩另类一区| 中文字幕在线一区免费| 久久99精品一区二区三区三区| 91官网在线观看| 国产欧美精品在线观看| 久久国产精品第一页| 91麻豆精品国产91久久久资源速度| 亚洲视频在线一区二区| 成人中文字幕合集| 久久久久久免费| 麻豆久久久久久| 日韩欧美一级特黄在线播放| 亚洲va国产天堂va久久en| 欧洲亚洲精品在线| 亚洲精品日产精品乱码不卡| 成人av影院在线| 国产女人水真多18毛片18精品视频| 秋霞午夜鲁丝一区二区老狼| 91精品国产综合久久久久久久久久| 亚洲综合无码一区二区| 色呦呦国产精品| 一区二区三区四区国产精品| 91视频你懂的| 一区二区久久久| 欧美在线观看视频在线| 亚洲图片欧美色图| 欧美日本免费一区二区三区| 亚洲最大成人综合| 欧美另类变人与禽xxxxx| 午夜av一区二区三区| 欧美一区二区黄| 韩国精品一区二区| 国产精品丝袜黑色高跟| 56国语精品自产拍在线观看| 国产在线视频不卡二| 欧美日韩一区二区三区不卡| 亚洲欧美aⅴ...| 欧美在线观看你懂的| 国产精品99久久久久久久vr| 久久久久国产一区二区三区四区| 国产aⅴ综合色| 亚洲欧美日韩电影| 91精品国产综合久久久蜜臀图片| 另类小说视频一区二区| 欧美精彩视频一区二区三区| 成人福利视频网站| 亚洲国产成人高清精品| 91精品国产综合久久福利| 韩国在线一区二区| 亚洲人一二三区| 51精品久久久久久久蜜臀| 韩日精品视频一区| 一区二区三区日韩欧美精品| 91麻豆精品国产91久久久资源速度 | 免费欧美在线视频| 国产色产综合色产在线视频| 91原创在线视频| 久久国产精品72免费观看| 国产精品视频九色porn| 欧美日韩一区二区电影| 国产成人亚洲精品狼色在线| 一区二区三区精品在线观看| 26uuu国产电影一区二区| 91小宝寻花一区二区三区| 免费成人美女在线观看.| 国产精品久久综合| 欧美电视剧在线观看完整版| 色香色香欲天天天影视综合网| 天天综合网天天综合色| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 亚洲国产精品黑人久久久| 欧美中文字幕久久| 国产91精品露脸国语对白| 日本亚洲最大的色成网站www| 国产嫩草影院久久久久| 欧美一区二区免费视频| 色国产综合视频| 国产精品中文字幕欧美| 日韩成人午夜电影| 一级日本不卡的影视| 国产精品福利一区二区| wwwwww.欧美系列| 日韩一本二本av| 欧美日本一区二区三区| 在线观看免费一区| 99久久777色| 国产成人精品免费网站| 精品在线观看免费| 免费不卡在线视频| 亚洲国产精品一区二区久久| 国产精品成人午夜| 国产精品久久精品日日| 久久九九久久九九| 久久午夜羞羞影院免费观看| 日韩一级免费一区| 欧美一区二区播放| 欧美一区二区日韩一区二区| 欧美日韩国产精品成人| 91国产丝袜在线播放| 色哟哟国产精品免费观看| 精品欧美黑人一区二区三区| 在线成人午夜影院| 欧美一区二区福利视频| 欧美大片国产精品| 欧美成人精品1314www| 精品免费视频一区二区| 久久只精品国产| 久久久精品国产99久久精品芒果 | 韩国中文字幕2020精品| 国产一区在线观看麻豆| 东方aⅴ免费观看久久av| 国产精品1024久久| 成人免费观看av| 99视频一区二区三区| 在线中文字幕一区二区| 欧美猛男男办公室激情| 欧美日韩国产色站一区二区三区| 91精品中文字幕一区二区三区| 日韩一二三区视频| 国产欧美日韩久久| 樱桃视频在线观看一区| 视频一区二区三区在线| 久久精品国产免费看久久精品| 国模大尺度一区二区三区| 国产成人在线观看| 91啪亚洲精品| 欧美一区二区私人影院日本| 久久综合久久鬼色中文字| 国产精品久久久久久久裸模| 一区二区免费视频| 麻豆高清免费国产一区| 成人免费看视频| 欧美亚洲动漫制服丝袜| 26uuu国产一区二区三区| 亚洲欧美在线视频观看| 日韩中文字幕1| 国产白丝精品91爽爽久久| 欧美色老头old∨ideo| 久久精品人人爽人人爽| 一区二区三区四区高清精品免费观看 | 亚洲狠狠爱一区二区三区| 另类人妖一区二区av| aaa欧美色吧激情视频| 欧美日韩国产高清一区二区| 久久奇米777| 天堂久久久久va久久久久| 成年人国产精品| 日韩欧美在线影院| 中文字幕中文字幕一区二区| 蜜臀av在线播放一区二区三区| 成人黄色大片在线观看| 日韩美女一区二区三区四区| 一区二区三区中文字幕电影 | 午夜精品久久久| 成人91在线观看| 日韩精品一区二区三区在线观看| 亚洲精品成人悠悠色影视| 国产一区 二区| 91精品国产综合久久久久久久久久 | 久久久精品蜜桃| 免费看精品久久片| 欧洲av在线精品| 美国三级日本三级久久99| www.欧美.com| 日本一区二区三区在线观看| 婷婷六月综合网| 在线免费观看日韩欧美| 中文av字幕一区| 国产一区二区成人久久免费影院| 欧美久久久一区| 一区二区三区四区不卡在线 | 亚洲福利一区二区三区| 97国产精品videossex| 欧美激情综合在线| 国产成人av电影在线观看| 日韩精品一区二区三区swag| 亚洲国产日韩在线一区模特| 99久久精品国产一区| 国产精品三级av在线播放| 国产一区二区三区精品欧美日韩一区二区三区 | 三级亚洲高清视频| 欧美中文字幕一区二区三区| 亚洲欧美一区二区三区极速播放| 国产乱码精品一区二区三区五月婷 | 精品中文字幕一区二区小辣椒| 欧美手机在线视频| 亚洲自拍偷拍欧美| 欧美日韩国产美女| 香蕉影视欧美成人| 在线成人免费视频| 美女一区二区久久|