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

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

?? rmalloc.c

?? sigmadesign smp8623 gui source code ,bingo
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* =====================================================================   File:	rmalloc.c   Author:	Rammi   Date:	11/16/1995 (started)   Reminder:	Use at your own risk.   Content:	Debug wrapper functions for the malloc library.   		For more information see rmalloc.h   Last Change: $Date: 2006/01/29 18:56:12 $   History:     $Log: rmalloc.c,v $   History:     Revision 1.9  2006/01/29 18:56:12  rammi   History:     Streamlined various things due to a proposal by Brant L Gurganus. Thanks Brant!   History:   History:     Revision 1.8  2003/01/31 15:47:52  rammi   History:     Changed signature of Rmalloc_set_flags() and Rmalloc_retag to return pointer.   History:   History:     Revision 1.7  2003/01/31 15:04:20  rammi   History:     Fixed unclosed comment.   History:   History:     Revision 1.6  2003/01/31 14:51:48  rammi   History:     Updated version to 1.16   History:   History:     Revision 1.5  2003/01/31 14:49:00  rammi   History:     Unset RM_STATIC flag in realloc to avoid warning on free   History:   History:     Revision 1.4  2002/04/22 17:39:34  rammi   History:     Added output of BREAK_GENERATION environment variable when used   History:   History:     Revision 1.3  2002/04/22 16:28:06  rammi   History:     Finetuning of generations feature   History:   History:     Revision 1.2  2002/04/22 15:26:16  rammi   History:     Added Karl Brace's generations feature.   History:   Pre-CVS history:   		04/11/1996 (Rammi)		Changed to hashed table for faster access   		04/15/1996 (Rammi)		Included statistics		08/16/1997 (Rammi)		Automatic output of used memory on exit		08/25/1997 (Rammi)		Catching signals in critical situations (partly)		02/18/1998 (Rammi)		Testing memory before outputting statistic		Overworked signal handling in IsPossibleFilePos()		Made it unnecessary of changing all mallocs etc		to upper case		02/19/1998 (Rammi)		Little changes to compile on Alpha (64bit) without		warnings		03/10/1998 (Rammi)		Added comments.		03/24/1998 (Rammi)		Allowed compilation without WITH_FLAGS		04/07/1998 (Rammi)		All output goes to stderr..		1.11beta is released as 1.11!		05/28/1998 (Rammi)		Changed comments to english for public release		Added some more signal handling.		06/01/1998 (Rammi)		Added output of (flagged) strings in ELOQUENT mode.		Changed all names from my_... to R...		This is version 1.12!		11/13/1998 (Rammi)		Multiple defined label when using ELOQUENT mode now fixed.		Added getcwd wrapper as a prototype how to handle library		functions returning heap memory.		This is version 1.13!	        06/10/99 (Rammi)		The getcwd wrapper had a bug as Greg Silverman pointed		out (I should better have tested it!). Also fixed a		missing prototype and improved the signal handling in		rtest to allow receiving more signals while handling		one.   ===================================================================== *//* =========   INCLUDEs:   ========= */#define ALLOW_OS_CODE 1#include <stdio.h>#include <unistd.h>#include <string.h>#include <strings.h>#include <assert.h>#include <setjmp.h>#include <signal.h>#undef  MALLOC_DEBUG		/* here we need the correct malloc functions */#define RM_NEED_PROTOTYPES	/* but we want to compare prototypes */#include "rmalloc.h"/* ========   DEFINEs:   ======== *//* Actual version */#define VERSION         "1.17"/* ================================================================== *//* ============ Switch settings for different behaviours ============ *//* ============        Please set as needed              ============ *//* ================================================================== *//* This switch sets, how and when the allocated blocks are tested * on correctness. Each block is tested at least when * reallocating/freeing it. * Possible values: * 	0:		Minimum testing. Uses less memory, but *	                does not allow statistics. * 	1:		Extra testing possible by using RM_TEST *	                macro. Statistics possible. *   	2:		Testing ALL blocks on every malloc/free. *	                Statistics possible. */#ifndef RM_TEST_DEPTH#define RM_TEST_DEPTH 	1#endif/* This switch sets whether Karl's generations feature should be used * See the HTML doc for a indepth explanation of generations. * If set generations are used, otherwise no generations are included. */#define GENERATIONS#ifdef GENERATIONS/* BREAK_GENERATION_COND is the condition to find the generation  you are * interested in. * Set your debugger to the function rmalloc_generation() to find out which * function stack creates that generation. * You can either set it as a comparision directly to the number of a * generation (known from a previous run), a comparision to the function * GetBreakGenerationEnv() which reads the break generation from the environment * variable BREAK_GENERATION or don't set it so the break feature is not used. * The macro form allows for more complicated conditions, see example below. */#define BREAK_GENERATION_COND(nr) ((nr) == GetBreakGenerationEnv())/* #define BREAK_GENERATION_COND(nr) ((nr) == 125) *//* #define BREAK_GENERATION_COND(nr) ((nr) == 42  ||  (nr) == 4711) *//* The maximum number of generations you'd like to see in the statistics */#define MAX_STAT_GENERATIONS 3#endif /* GENERATIONS *//* Switch on EXTENTED alloc information. (Makes sense if an actual * error is observed such as a multiple free) *///#define ELOQUENT/* Allows setting of special flags with the RM_SET_FLAGS macro. * Needs more memory. */#define WITH_FLAGS/* Allows realloc(NULL, ...) * Posix allows this but there are some old malloc libraries * which crash on this. Switch on if you want to be compatible. *//* #define ALLOW_REALLOC_NULL *//* Allows free(NULL) * I still consider this an error in my progs because I use * NULL always as a very special value. *//* #define ALLOW_FREE_NULL *//* ================================================================== *//* ========================  Other Defines  ========================= *//* ================================================================== *//* Alignment (8 bytes are ok for virtually all machines) */#define ALIGNMENT	8/* Output message header: */#define HEAD		"<MALLOC_DEBUG>\t"/* Alignment padding: */#define ALIGN(s)	(((s+ALIGNMENT-1)/ALIGNMENT)*ALIGNMENT)/* Magic marker for block start: */#define PREV_STOP 	0x55555555/* Additional space for block begin to keep alignment: */#define START_SPACE     ALIGN(sizeof(begin))/* Additional space at end of block */#define END_SPACE       (sizeof(End))/* Overall additional space per block: */#define EXTRA_SPACE     (START_SPACE+END_SPACE)/* Hashtable size: */#define HASHSIZE	513/* Hash function: */#define HASH(p)		((((unsigned long)(p))/ALIGNMENT)%HASHSIZE)/* ==========================   STRUCTs, TYPEDEFs & ENUMs:   ========================== *//* This Information is added to the beginning of every * allocated block. */typedef struct _begin {  unsigned       StpA;		/* Magic bytes */#if RM_TEST_DEPTH > 0  struct _begin	*Next,		/* for linking in forward */	        *Prev;		/* and backward direction */#endif  const char	*File;		/* Filepos of allocation command */  size_t	 Size;		/* Size demanded */#ifdef GENERATIONS  unsigned       Generation;    /* All mallocs are numbered */#endif#ifdef WITH_FLAGS  unsigned       Flags;		/* Special flags */#endif  unsigned 	 StpB;		/* Magic bytes */} begin;/* * Global data. */typedef struct _global {  unsigned	 isInitialized;	/* Flag: already initialized? */  unsigned	 BlockCount;    /* Number of allocated blocks */} global;/* =======   CONSTs:   ======= *//* Magic block end: */static unsigned char End[] = {  0xA5, 0xA5, 0xA5, 0xA5,	/* odd */  0x5B, 0x5B, 0x5B, 0x5B,	/* odd */  0xAB, 0xAB, 0xAB, 0xAB,	/* odd */  0xAA, 0x55, 0xAA, 0x55	/* odd */};/* ========   GLOBALs:   ======== */#ifdef GENERATIONS/* The current generation. This is simply incremented which each call. */static unsigned cur_generation = 0;#endif/* =======   LOCALs:   ======= */#if RM_TEST_DEPTH > 0/* Stop marker for linked list of allocated blocks: */static begin ChainTempl = {  PREV_STOP,  &ChainTempl,  &ChainTempl,  "<Special>",  0,#ifdef GENERATIONS  0,#endif#ifdef WITH_FLAGS  0,#endif  PREV_STOP};/* Hashed linked lists: */static begin Chain[HASHSIZE];/* Global data used: */static global Global = {  0,				/* is initialized?  */  0				/* number of blocks */};#endif /* RM_TEST_DEPTH *//* Internally used longjmp target used if errors occure. */static jmp_buf   errorbuf;/* ========   FORWARD:   ======== */static int       FindBlk(const unsigned char *P);/* ===============================================================   			IMPLEMENTATION   =============================================================== *//* =============================================================================   Function:		FatalSignal	// local //   Author:		Rammi   Date:		08/25/1997   Return:		---   Parameter:		signum    signal number   Purpose:		Signal handler f?r fatal signals (SIGBUS, SIGSEGV)   ============================================================================= *///static void FatalSignal(int signum)//{//  /* --- jump to a save place --- *///  longjmp(errorbuf, signum);//}/* =============================================================================   Function:		IsPossibleFilePos	// local //   Author:		Rammi   Date:		11/30/1996   Return:		!= 0    possibly ok                        0       seems not so   Parameter:		file	possible filename			size    possible size   Purpose:		Decide whether file could be a filename and   			size a block size.   ============================================================================= */static int IsPossibleFilePos(const char *file, int size){  void   (*old_sigsegv_handler)(int) = SIG_DFL;  void   (*old_sigbus_handler)(int)  = SIG_DFL;//  char    *dp;//  int      ret;  if (setjmp(errorbuf)) {    /* uh oh, we got a kick in the ass */    signal(SIGSEGV, old_sigsegv_handler);    signal(SIGBUS,  old_sigbus_handler);    printf ("hola\n");    return 0;  }  printf ("nohola\n");//  /* --- the following is dangerous! So catch signals --- *///  old_sigsegv_handler = signal(SIGSEGV, FatalSignal);//  old_sigbus_handler  = signal(SIGBUS,  FatalSignal);////  dp  = strchr(file, ':');	/* file pos needs : */////  ret =  (dp   &&   dp-file > 3   &&   !strncmp(dp-2, ".c", 2)   &&//	  atoi(dp+1) > 0   &&   size >= 0);////  /* --- danger is over! --- *///  signal(SIGSEGV, old_sigsegv_handler);//  signal(SIGBUS,  old_sigbus_handler);////  return ret;  return 0;}#ifdef GENERATIONS/* =============================================================================   Function:		GetBreakGenerationEnv	// lokal //   Author:		Rammi   Date:		04/22/2002   Return:	        the content of the BREAK_GENERATION environment variable                        or 0   Parameter:		---   Purpose:		Return the content of the environment variable                        BREAK_GENERATION (a number indicating which is the                        generation you want to break with the debugger).   ============================================================================= */static unsigned GetBreakGenerationEnv(void){  /* The environment variable is buffered here for faster access. */  static char *breakGenerationEnv = (char *)-1;  /** The result of the conversion to unsigned is buffered here. */  static unsigned result = 0;  if (breakGenerationEnv == (char *)-1) {    /* 1st call: get the environment variable */    breakGenerationEnv = getenv("BREAK_GENERATION");    if (breakGenerationEnv != NULL) {      /* try conversion */      result = atoi(breakGenerationEnv);      fprintf(stderr,	      HEAD "Using environment variable BREAK_GENERATION=%d\n",	      result);    }  }  return result;}#endif /* GENERATIONS *//* =============================================================================   Function:		ControlBlock	// lokal //   Author:		Rammi   Date:		11/16/1995   Return:		---   Parameter:		Bkl	Pos of allocated block (original)   			file	file pos from where initial lib function				was called   Purpose:		Control integrity of block   ============================================================================= */static void ControlBlock(begin *B, const char *file){  unsigned char *p = (((unsigned char *)B)+START_SPACE);#if RM_TEST_DEPTH > 0  int DoAbort = 0;#endif  /* === the very beginning === */  if (B->StpA != PREV_STOP) {#if RM_TEST_DEPTH > 0    DoAbort = 1;#endif    fprintf(stderr, HEAD	    "Corrupted block begin (overwritten from elsewhere)\n"	    "\tshould be: %08x\n"	    "\tis:        %08x\n"#ifdef GENERATIONS	    "\tblock was allocated in %s [%u Bytes, generation %u]\n"#else	    "\tblock was allocated in %s [%u Bytes]\n"#endif	    "\terror was detected in  %s\n",	    PREV_STOP,	    B->StpA,	    B->File,	    (unsigned) B->Size,#ifdef GENERATIONS	    B->Generation,#endif	    file);  }  /* === begin of user data === */  if (B->StpB != PREV_STOP) {#if RM_TEST_DEPTH > 0    DoAbort = 1;#endif    fprintf(stderr, HEAD	    "Corrupted block begin (possibly written back)\n"	    "\tshould be: %08x\n"	    "\tis:        %08x\n"#ifdef GENERATIONS	    "\tblock was allocated in %s [%u Bytes, generation %u]\n"#else	    "\tblock was allocated in %s [%u Bytes]\n"#endif	    "\terror was detected in  %s\n",	    PREV_STOP,	    B->StpB,	    B->File,	    (unsigned) B->Size,#ifdef GENERATIONS	    B->Generation,#endif	    file);  }  /* === end of user data === */  if (memcmp(p+B->Size, &End, END_SPACE) != 0) {    unsigned char *E = (unsigned char *)(p+B->Size);    unsigned i;    int found = 0;#if RM_TEST_DEPTH > 0    DoAbort = 1;#endif    fprintf(stderr, HEAD	    "Corrupted block end (possibly written past the end)\n"	    "\tshould be:");    for (i = 0;   i < END_SPACE;   i++) {      fprintf(stderr, i%4 ? "%02x" : " %02x", End[i]);    }    fprintf(stderr,	    "\n\tis:       ");    for (i = 0;   i < END_SPACE;   i++) {      fprintf(stderr, i%sizeof(int) ? "%02x" : " %02x", E[i]);    }    fprintf(stderr, "\n"#ifdef GENERATIONS	    "\tblock was allocated in %s [%u Bytes, generation %u]\n"#else	    "\tblock was allocated in %s [%u Bytes]\n"#endif	    "\terror was detected in %s\n",	    B->File,	    (unsigned) B->Size,#ifdef GENERATIONS	    B->Generation,#endif	    file	    );#if RM_TEST_DEPTH > 0    if (!((unsigned long)E % sizeof(void *))   &&	!(*(unsigned long *)E % sizeof(void *))) {  /* because of alignment */      /* Special service: look if memory was overwritten with pointer */      if (FindBlk(*(unsigned char **)E)) {	begin *b = (begin *)((*(unsigned char **)E)-START_SPACE);	if (IsPossibleFilePos(b->File, b->Size)) {	  fprintf(stderr,		  "\tFirst %d bytes of overwritten memory can be interpreted\n"		  "\t\tas a pointer to a block "		  " allocated in:\n"#ifdef GENERATIONS		  "\t\t%s [%u Bytes, generation %u]\n",#else		  "\t\t%s [%u Bytes]\n",#endif		  (short)sizeof(void *),		  b->File,		  (unsigned short) b->Size#ifdef GENERATIONS		  , (unsigned short)b->Generation#endif		  );	  found = 1;	}      }    }    if (!found)#endif    {      /* Look, what we can find... */      int  j;      for (j = END_SPACE-1;   j >= 0;   j--) {	if (E[j] != End[j]) {	  break;	}      }      if (j >= 0   &&   !E[j]) {	/* Ends with '\0', so it's possibly a string */	if (j > 0) {	  while (--j >= 0) {	    if (!E[j]) {	      break;	    }	  }	  if (j < 0) {	    fprintf(stderr,		    "\tLooks somewhat like a too long string,\n"		    "\t\tending with \"%s\"\n",		    E);	  }	}	else {	  /* Off by one? */	  fprintf(stderr,		  "\tLooks like string allocated one byte too short\n"		  "\t\t(forgetting the nul byte)\n");	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
盗摄精品av一区二区三区| 色综合欧美在线视频区| 综合激情网...| 欧美一区二区三区免费大片| 国产大陆a不卡| 日本成人在线电影网| 亚洲天堂a在线| 国产欧美一区二区精品性| 欧美日韩国产中文| 99久久国产免费看| 国产成a人亚洲| 精品无码三级在线观看视频| 一区二区欧美在线观看| 国产欧美一区二区精品忘忧草| 91精品在线免费观看| 色综合中文综合网| 奇米影视在线99精品| 亚洲精品日韩综合观看成人91| 久久精品视频一区二区| 欧美大尺度电影在线| 欧美亚洲国产一区在线观看网站| av在线免费不卡| 国产一区二区三区久久悠悠色av| 日本不卡视频在线观看| 亚洲bdsm女犯bdsm网站| 亚洲精品免费电影| 久久精品国产一区二区三区免费看| 在线不卡a资源高清| 在线视频你懂得一区二区三区| 成人av资源网站| 国产激情精品久久久第一区二区| 久久精品99国产精品日本| 丝袜美腿亚洲一区| 亚洲成人av在线电影| 一区二区三区成人在线视频| 亚洲三级理论片| 亚洲精品伦理在线| 亚洲欧美激情一区二区| 亚洲视频网在线直播| 最新日韩av在线| 亚洲人成精品久久久久| 亚洲精品美国一| 亚洲专区一二三| 日韩制服丝袜先锋影音| 日本不卡视频在线| 精品一区二区三区免费观看| 久久99精品国产.久久久久| 国产在线精品一区二区夜色| 精品一区二区三区在线观看| 国产精品自拍在线| 99久久99久久精品免费观看| 91麻豆高清视频| 欧美卡1卡2卡| 欧美成人午夜电影| 国产日韩精品一区二区浪潮av| 国产精品免费网站在线观看| 欧美国产1区2区| 亚洲精品第一国产综合野| 亚洲综合成人网| 日本不卡123| 国产精品一区二区黑丝| 成人app软件下载大全免费| 色噜噜久久综合| 欧美一区二区三区在线观看视频| 精品国产网站在线观看| 国产精品你懂的在线欣赏| 夜夜爽夜夜爽精品视频| 免费不卡在线视频| 国产aⅴ综合色| 欧美日韩一级视频| 久久免费美女视频| 一区二区三区在线看| 日韩av在线免费观看不卡| 国产成人在线视频免费播放| 亚洲成人一区在线| 亚洲图片激情小说| 日韩黄色在线观看| 成人免费视频网站在线观看| 色八戒一区二区三区| 欧美mv和日韩mv的网站| 成人欧美一区二区三区黑人麻豆| 天天综合天天综合色| 国产激情一区二区三区| 欧美日韩亚洲国产综合| 国产亚洲一区二区在线观看| 亚洲精品国产精品乱码不99| 美女性感视频久久| 91麻豆免费在线观看| 日韩美女在线视频| 亚洲久草在线视频| 国模大尺度一区二区三区| 色猫猫国产区一区二在线视频| 精品国产乱码久久久久久影片| 亚洲精品久久久蜜桃| 国产一区二区不卡在线| 欧美福利电影网| 最近中文字幕一区二区三区| 九色porny丨国产精品| 91丨九色丨黑人外教| 精品精品国产高清a毛片牛牛 | 久久综合色播五月| 洋洋成人永久网站入口| 成人综合日日夜夜| 欧美大片在线观看| 视频一区在线播放| 色综合天天在线| 欧美激情一区三区| 久久99精品国产麻豆婷婷洗澡| 欧美在线小视频| 日韩美女视频一区二区| 国产高清无密码一区二区三区| 欧美一区二区视频在线观看2022| 亚洲毛片av在线| aa级大片欧美| 国产精品毛片a∨一区二区三区| 久久精品国产精品亚洲红杏 | 精品电影一区二区三区| 首页国产欧美久久| 欧美日韩一区二区在线观看视频 | 久久99国内精品| 蜜臀av一区二区在线免费观看| 精品系列免费在线观看| 欧美三区在线观看| 亚洲男帅同性gay1069| 成人福利视频在线看| 国产精品网站在线播放| 国产乱子轮精品视频| 91精选在线观看| 日本不卡免费在线视频| 777午夜精品免费视频| 天堂久久久久va久久久久| 欧美日韩三级一区| 爽好久久久欧美精品| 欧美精品久久99久久在免费线| 亚洲国产精品天堂| 欧美精品在线一区二区三区| 日韩国产欧美在线观看| 欧美区视频在线观看| 日韩国产欧美视频| 日韩欧美在线一区二区三区| 麻豆91精品视频| 久久久亚洲国产美女国产盗摄| 国产一区啦啦啦在线观看| 久久新电视剧免费观看| 国产盗摄女厕一区二区三区 | 日韩精品一区国产麻豆| 激情综合一区二区三区| 久久久久国产一区二区三区四区| 国产成人精品免费看| 国产精品欧美经典| 在线观看日韩电影| 午夜精品久久久久久久99水蜜桃| 91精品麻豆日日躁夜夜躁| 麻豆国产精品一区二区三区| 久久夜色精品一区| av亚洲精华国产精华精| 亚洲综合成人在线| 日韩欧美视频在线 | 欧美丰满少妇xxxxx高潮对白| 午夜激情一区二区| 久久久亚洲精品石原莉奈| 99久久精品一区| 亚洲成人精品一区二区| 欧美大片一区二区| 成人激情午夜影院| 性做久久久久久免费观看欧美| 日韩一区二区视频在线观看| 国产盗摄视频一区二区三区| 亚洲蜜臀av乱码久久精品蜜桃| 欧美日韩日日夜夜| 国产成人午夜视频| 一区二区成人在线| 亚洲精品一区二区三区福利 | 久久影视一区二区| 国产久卡久卡久卡久卡视频精品| ...xxx性欧美| 欧美一区二区三区四区五区 | 奇米综合一区二区三区精品视频| 久久久av毛片精品| 欧美日韩一级片网站| 国产成人免费在线观看不卡| 亚洲最大色网站| 国产亚洲精品中文字幕| 欧美网站一区二区| 国产91精品露脸国语对白| 一区二区三区精密机械公司| 亚洲精品在线观| 欧美日韩三级一区| av一区二区三区| 精品一区二区在线视频| 亚洲综合久久久久| 国产精品欧美一区喷水| 欧美一区二区三区四区在线观看| 99久久免费视频.com| 极品少妇一区二区| 日韩中文字幕91| 有坂深雪av一区二区精品| 久久久五月婷婷| 69久久99精品久久久久婷婷| www.亚洲色图.com|