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

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

?? free.c

?? Axis 221 camera embedded programing interface
?? C
字號:
/*  This is a version (aka dlmalloc) of malloc/free/realloc written by  Doug Lea and released to the public domain.  Use, modify, and  redistribute this code without permission or acknowledgement in any  way you wish.  Send questions, comments, complaints, performance  data, etc to dl@cs.oswego.edu  VERSION 2.7.2 Sat Aug 17 09:07:30 2002  Doug Lea  (dl at gee)  Note: There may be an updated version of this malloc obtainable at           ftp://gee.cs.oswego.edu/pub/misc/malloc.c  Check before installing!  Hacked up for uClibc by Erik Andersen <andersen@codepoet.org>*/#include "malloc.h"/* ------------------------- malloc_trim -------------------------  malloc_trim(size_t pad);  If possible, gives memory back to the system (via negative  arguments to sbrk) if there is unused memory at the `high' end of  the malloc pool. You can call this after freeing large blocks of  memory to potentially reduce the system-level memory requirements  of a program. However, it cannot guarantee to reduce memory. Under  some allocation patterns, some large free blocks of memory will be  locked between two used chunks, so they cannot be given back to  the system.    The `pad' argument to malloc_trim represents the amount of free  trailing space to leave untrimmed. If this argument is zero,  only the minimum amount of memory to maintain internal data  structures will be left (one page or less). Non-zero arguments  can be supplied to maintain enough trailing space to service  future expected allocations without having to re-obtain memory  from the system.    Malloc_trim returns 1 if it actually released any memory, else 0.  On systems that do not support "negative sbrks", it will always  return 0.*/int malloc_trim(size_t pad){  mstate av = get_malloc_state();  __malloc_consolidate(av);  return __malloc_trim(pad, av);}/* ------------------------- __malloc_trim -------------------------   __malloc_trim is an inverse of sorts to __malloc_alloc.  It gives memory   back to the system (via negative arguments to sbrk) if there is unused   memory at the `high' end of the malloc pool. It is called automatically by   free() when top space exceeds the trim threshold. It is also called by the   public malloc_trim routine.  It returns 1 if it actually released any   memory, else 0.*/static int __malloc_trim(size_t pad, mstate av){    long  top_size;        /* Amount of top-most memory */    long  extra;           /* Amount to release */    long  released;        /* Amount actually released */    char* current_brk;     /* address returned by pre-check sbrk call */    char* new_brk;         /* address returned by post-check sbrk call */    size_t pagesz;    pagesz = av->pagesize;    top_size = chunksize(av->top);    /* Release in pagesize units, keeping at least one page */    extra = ((top_size - pad - MINSIZE + (pagesz-1)) / pagesz - 1) * pagesz;    if (extra > 0) {	/*	   Only proceed if end of memory is where we last set it.	   This avoids problems if there were foreign sbrk calls.	   */	current_brk = (char*)(MORECORE(0));	if (current_brk == (char*)(av->top) + top_size) {	    /*	       Attempt to release memory. We ignore MORECORE return value,	       and instead call again to find out where new end of memory is.	       This avoids problems if first call releases less than we asked,	       of if failure somehow altered brk value. (We could still	       encounter problems if it altered brk in some very bad way,	       but the only thing we can do is adjust anyway, which will cause	       some downstream failure.)	       */	    MORECORE(-extra);	    new_brk = (char*)(MORECORE(0));	    if (new_brk != (char*)MORECORE_FAILURE) {		released = (long)(current_brk - new_brk);		if (released != 0) {		    /* Success. Adjust top. */		    av->sbrked_mem -= released;		    set_head(av->top, (top_size - released) | PREV_INUSE);		    check_malloc_state();		    return 1;		}	    }	}    }    return 0;}/*  Initialize a malloc_state struct.  This is called only from within __malloc_consolidate, which needs  be called in the same contexts anyway.  It is never called directly  outside of __malloc_consolidate because some optimizing compilers try  to inline it at all call points, which turns out not to be an  optimization at all. (Inlining it in __malloc_consolidate is fine though.)*/static void malloc_init_state(mstate av){    int     i;    mbinptr bin;    /* Establish circular links for normal bins */    for (i = 1; i < NBINS; ++i) {	bin = bin_at(av,i);	bin->fd = bin->bk = bin;    }    av->top_pad        = DEFAULT_TOP_PAD;    av->n_mmaps_max    = DEFAULT_MMAP_MAX;    av->mmap_threshold = DEFAULT_MMAP_THRESHOLD;    av->trim_threshold = DEFAULT_TRIM_THRESHOLD;#if MORECORE_CONTIGUOUS    set_contiguous(av);#else    set_noncontiguous(av);#endif    set_max_fast(av, DEFAULT_MXFAST);    av->top            = initial_top(av);    av->pagesize       = malloc_getpagesize;}/* ---------------------------------------------------------------------- * * PUBLIC STUFF * * ----------------------------------------------------------------------*//* ------------------------- __malloc_consolidate -------------------------  __malloc_consolidate is a specialized version of free() that tears  down chunks held in fastbins.  Free itself cannot be used for this  purpose since, among other things, it might place chunks back onto  fastbins.  So, instead, we need to use a minor variant of the same  code.  Also, because this routine needs to be called the first time through  malloc anyway, it turns out to be the perfect place to trigger  initialization code.*/void __malloc_consolidate(mstate av){    mfastbinptr*    fb;                 /* current fastbin being consolidated */    mfastbinptr*    maxfb;              /* last fastbin (for loop control) */    mchunkptr       p;                  /* current chunk being consolidated */    mchunkptr       nextp;              /* next chunk to consolidate */    mchunkptr       unsorted_bin;       /* bin header */    mchunkptr       first_unsorted;     /* chunk to link to */    /* These have same use as in free() */    mchunkptr       nextchunk;    size_t size;    size_t nextsize;    size_t prevsize;    int             nextinuse;    mchunkptr       bck;    mchunkptr       fwd;    /*       If max_fast is 0, we know that av hasn't       yet been initialized, in which case do so below       */    if (av->max_fast != 0) {	clear_fastchunks(av);	unsorted_bin = unsorted_chunks(av);	/*	   Remove each chunk from fast bin and consolidate it, placing it	   then in unsorted bin. Among other reasons for doing this,	   placing in unsorted bin avoids needing to calculate actual bins	   until malloc is sure that chunks aren't immediately going to be	   reused anyway.	   */	maxfb = &(av->fastbins[fastbin_index(av->max_fast)]);	fb = &(av->fastbins[0]);	do {	    if ( (p = *fb) != 0) {		*fb = 0;		do {		    check_inuse_chunk(p);		    nextp = p->fd;		    /* Slightly streamlined version of consolidation code in free() */		    size = p->size & ~PREV_INUSE;		    nextchunk = chunk_at_offset(p, size);		    nextsize = chunksize(nextchunk);		    if (!prev_inuse(p)) {			prevsize = p->prev_size;			size += prevsize;			p = chunk_at_offset(p, -((long) prevsize));			unlink(p, bck, fwd);		    }		    if (nextchunk != av->top) {			nextinuse = inuse_bit_at_offset(nextchunk, nextsize);			set_head(nextchunk, nextsize);			if (!nextinuse) {			    size += nextsize;			    unlink(nextchunk, bck, fwd);			}			first_unsorted = unsorted_bin->fd;			unsorted_bin->fd = p;			first_unsorted->bk = p;			set_head(p, size | PREV_INUSE);			p->bk = unsorted_bin;			p->fd = first_unsorted;			set_foot(p, size);		    }		    else {			size += nextsize;			set_head(p, size | PREV_INUSE);			av->top = p;		    }		} while ( (p = nextp) != 0);	    }	} while (fb++ != maxfb);    }    else {	malloc_init_state(av);	check_malloc_state();    }}/* ------------------------------ free ------------------------------ */void free(void* mem){    mstate av;    mchunkptr       p;           /* chunk corresponding to mem */    size_t size;        /* its size */    mfastbinptr*    fb;          /* associated fastbin */    mchunkptr       nextchunk;   /* next contiguous chunk */    size_t nextsize;    /* its size */    int             nextinuse;   /* true if nextchunk is used */    size_t prevsize;    /* size of previous contiguous chunk */    mchunkptr       bck;         /* misc temp for linking */    mchunkptr       fwd;         /* misc temp for linking */    /* free(0) has no effect */    if (mem == NULL)	return;    LOCK;    av = get_malloc_state();    p = mem2chunk(mem);    size = chunksize(p);    check_inuse_chunk(p);    /*       If eligible, place chunk on a fastbin so it can be found       and used quickly in malloc.       */    if ((unsigned long)(size) <= (unsigned long)(av->max_fast)#if TRIM_FASTBINS	    /* If TRIM_FASTBINS set, don't place chunks	       bordering top into fastbins */	    && (chunk_at_offset(p, size) != av->top)#endif       ) {	set_fastchunks(av);	fb = &(av->fastbins[fastbin_index(size)]);	p->fd = *fb;	*fb = p;    }    /*       Consolidate other non-mmapped chunks as they arrive.       */    else if (!chunk_is_mmapped(p)) {	set_anychunks(av);	nextchunk = chunk_at_offset(p, size);	nextsize = chunksize(nextchunk);	/* consolidate backward */	if (!prev_inuse(p)) {	    prevsize = p->prev_size;	    size += prevsize;	    p = chunk_at_offset(p, -((long) prevsize));	    unlink(p, bck, fwd);	}	if (nextchunk != av->top) {	    /* get and clear inuse bit */	    nextinuse = inuse_bit_at_offset(nextchunk, nextsize);	    set_head(nextchunk, nextsize);	    /* consolidate forward */	    if (!nextinuse) {		unlink(nextchunk, bck, fwd);		size += nextsize;	    }	    /*	       Place the chunk in unsorted chunk list. Chunks are	       not placed into regular bins until after they have	       been given one chance to be used in malloc.	       */	    bck = unsorted_chunks(av);	    fwd = bck->fd;	    p->bk = bck;	    p->fd = fwd;	    bck->fd = p;	    fwd->bk = p;	    set_head(p, size | PREV_INUSE);	    set_foot(p, size);	    check_free_chunk(p);	}	/*	   If the chunk borders the current high end of memory,	   consolidate into top	   */	else {	    size += nextsize;	    set_head(p, size | PREV_INUSE);	    av->top = p;	    check_chunk(p);	}	/*	   If freeing a large space, consolidate possibly-surrounding	   chunks. Then, if the total unused topmost memory exceeds trim	   threshold, ask malloc_trim to reduce top.	   Unless max_fast is 0, we don't know if there are fastbins	   bordering top, so we cannot tell for sure whether threshold	   has been reached unless fastbins are consolidated.  But we	   don't want to consolidate on each free.  As a compromise,	   consolidation is performed if FASTBIN_CONSOLIDATION_THRESHOLD	   is reached.	   */	if ((unsigned long)(size) >= FASTBIN_CONSOLIDATION_THRESHOLD) {	    if (have_fastchunks(av))		__malloc_consolidate(av);	    if ((unsigned long)(chunksize(av->top)) >=		    (unsigned long)(av->trim_threshold))		__malloc_trim(av->top_pad, av);	}    }    /*       If the chunk was allocated via mmap, release via munmap()       Note that if HAVE_MMAP is false but chunk_is_mmapped is       true, then user must have overwritten memory. There's nothing       we can do to catch this error unless DEBUG is set, in which case       check_inuse_chunk (above) will have triggered error.       */    else {	int ret;	size_t offset = p->prev_size;	av->n_mmaps--;	av->mmapped_mem -= (size + offset);	ret = munmap((char*)p - offset, size + offset);	/* munmap returns non-zero on failure */	assert(ret == 0);    }    UNLOCK;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
wwwwww.欧美系列| 日韩视频在线观看一区二区| 国产精品久久网站| 国产成人在线色| 亚洲国产精品成人综合色在线婷婷| 国产成人在线网站| 亚洲日本丝袜连裤袜办公室| 欧美综合在线视频| 日韩中文字幕亚洲一区二区va在线 | 亚洲人成伊人成综合网小说| 色综合久久久久综合99| 天天色天天操综合| 久久久久久夜精品精品免费| 成人午夜视频免费看| 亚洲美女偷拍久久| 欧美精品18+| 久久精品二区亚洲w码| 国产精品免费网站在线观看| 欧美亚洲高清一区二区三区不卡| 天天av天天翘天天综合网色鬼国产| 日韩一级免费一区| 成人免费毛片片v| 五月天国产精品| 国产欧美一区二区精品性色 | 国产乱码精品一区二区三区av | 中文乱码免费一区二区| 91国产成人在线| 国产一区二区三区最好精华液| 中文字幕视频一区| 欧美一级片在线观看| 成人动漫av在线| 日韩av电影天堂| 1区2区3区国产精品| 91精品蜜臀在线一区尤物| proumb性欧美在线观看| 日韩国产成人精品| 亚洲欧美日韩电影| 国产欧美一区二区三区鸳鸯浴 | 精品少妇一区二区三区视频免付费 | 欧美久久一区二区| 成人免费视频国产在线观看| 日本午夜精品视频在线观看| ...av二区三区久久精品| 日韩一级片网址| 精品视频在线免费看| 国产91精品久久久久久久网曝门| 三级久久三级久久| 亚洲精品午夜久久久| 久久久久免费观看| 日韩欧美国产午夜精品| 在线免费观看不卡av| heyzo一本久久综合| 色一情一伦一子一伦一区| 国产在线精品国自产拍免费| 午夜视频在线观看一区二区| 国产精品理论在线观看| 久久久蜜臀国产一区二区| 91精品国产综合久久久久久久久久| 色综合久久综合中文综合网| 岛国一区二区在线观看| 国产一区二区调教| 国产综合久久久久影院| 蜜臀av国产精品久久久久| 亚洲成人综合网站| 亚洲永久免费av| 亚洲综合激情小说| 一区二区三区自拍| 亚洲毛片av在线| 亚洲久草在线视频| 亚洲欧美日韩一区二区| 亚洲美女视频在线| 一区二区三区波多野结衣在线观看| 亚洲裸体在线观看| 夜夜夜精品看看| 亚洲香肠在线观看| 偷拍日韩校园综合在线| 日本欧洲一区二区| 看片的网站亚洲| 国产一区视频导航| 国产成人免费在线| 成人一道本在线| 91香蕉国产在线观看软件| 972aa.com艺术欧美| 91一区二区三区在线观看| 91视频观看视频| 欧美性色欧美a在线播放| 欧美亚洲综合色| 91精品在线观看入口| 日韩一区二区精品葵司在线| 日韩精品一区二区三区swag| 久久久亚洲午夜电影| 国产精品国产a级| 亚洲一区二区三区免费视频| 日韩精品每日更新| 国产精品一二三在| av网站一区二区三区| 91国产精品成人| 日韩一区二区麻豆国产| 欧美极品美女视频| 一区二区三区欧美日| 人人狠狠综合久久亚洲| 国产一区二区福利| 91国内精品野花午夜精品| 欧美一级一区二区| 中国色在线观看另类| 亚洲一区二区精品3399| 久久av老司机精品网站导航| 成人国产精品免费观看动漫 | 亚洲电影在线播放| 国内精品伊人久久久久av一坑| 成人国产精品免费观看视频| 欧美日韩国产经典色站一区二区三区| 日韩欧美国产精品一区| 中文字幕巨乱亚洲| 日韩中文欧美在线| 国产成人精品一区二区三区四区 | 欧美三级日韩三级| www精品美女久久久tv| 亚洲欧美成aⅴ人在线观看| 五月激情六月综合| 成人动漫一区二区| 欧美电视剧在线观看完整版| 亚洲区小说区图片区qvod| 九一九一国产精品| 欧美综合亚洲图片综合区| 久久毛片高清国产| 三级久久三级久久久| 91日韩在线专区| 国产欧美一区二区精品忘忧草| 亚洲一区免费视频| 99麻豆久久久国产精品免费优播| 91精品免费观看| 一区二区三区在线免费视频| 国产精品自拍在线| 日韩欧美国产三级| 天天色图综合网| 欧美综合一区二区| 亚洲人吸女人奶水| 国产69精品久久99不卡| 日韩美女视频一区二区在线观看| 亚洲综合色自拍一区| 9色porny自拍视频一区二区| 久久亚洲综合色一区二区三区| 亚洲丶国产丶欧美一区二区三区| www.av精品| 日本亚洲三级在线| 欧美午夜电影在线播放| 亚洲欧美日韩在线播放| 波多野结衣中文字幕一区二区三区 | 中文字幕不卡在线播放| 精彩视频一区二区| 日韩欧美黄色影院| 免费不卡在线观看| 欧美精品一二三四| 亚洲黄色小视频| 91丨porny丨蝌蚪视频| 国产精品久久久久桃色tv| 国产精品亚洲综合一区在线观看| 欧美成va人片在线观看| 日韩va亚洲va欧美va久久| 8x福利精品第一导航| 午夜一区二区三区在线观看| 欧美无砖砖区免费| 天堂久久久久va久久久久| 欧美日韩成人在线| 亚洲资源在线观看| 欧美日韩一区二区三区视频| 亚洲综合区在线| 欧美日韩国产中文| 男男gaygay亚洲| 欧美电视剧在线观看完整版| 激情五月激情综合网| 精品国产一区二区三区久久影院| 另类人妖一区二区av| 精品黑人一区二区三区久久| 九色porny丨国产精品| 久久久亚洲精品石原莉奈| 成人免费高清视频| 亚洲免费观看高清完整版在线| 91精品福利在线| 日韩精品久久理论片| 久久综合视频网| 成人做爰69片免费看网站| 亚洲丝袜自拍清纯另类| 日本黄色一区二区| 美洲天堂一区二卡三卡四卡视频| 欧美成人乱码一区二区三区| 国产精品资源在线看| 亚洲丝袜另类动漫二区| 欧美精品123区| 国产精品一级黄| 亚洲精品午夜久久久| 欧美一区午夜精品| 成人a级免费电影| 亚洲自拍偷拍麻豆| 精品久久一区二区| 成人a级免费电影| 丝袜亚洲另类欧美| 中文幕一区二区三区久久蜜桃| 91国内精品野花午夜精品|