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

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

?? stl_alloc.h

?? STL 最新源代碼
?? H
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright (c) 1996-1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation.  Silicon Graphics makes no * representations about the suitability of this software for any * purpose.  It is provided "as is" without express or implied warranty. *//* NOTE: This is an internal header file, included by other STL headers. *   You should not attempt to use it directly. */#ifndef __SGI_STL_INTERNAL_ALLOC_H#define __SGI_STL_INTERNAL_ALLOC_H#ifdef __SUNPRO_CC#  define __PRIVATE public   // Extra access restrictions prevent us from really making some things   // private.#else#  define __PRIVATE private#endif#ifdef __STL_STATIC_TEMPLATE_MEMBER_BUG#  define __USE_MALLOC#endif// This implements some standard node allocators.  These are// NOT the same as the allocators in the C++ draft standard or in// in the original STL.  They do not encapsulate different pointer// types; indeed we assume that there is only one pointer type.// The allocation primitives are intended to allocate individual objects,// not larger arenas as with the original STL allocators.#ifndef __THROW_BAD_ALLOC#  if defined(__STL_NO_BAD_ALLOC) || !defined(__STL_USE_EXCEPTIONS)#    include <stdio.h>#    include <stdlib.h>#    define __THROW_BAD_ALLOC fprintf(stderr, "out of memory\n"); exit(1)#  else /* Standard conforming out-of-memory handling */#    include <new>#    define __THROW_BAD_ALLOC throw std::bad_alloc()#  endif#endif#include <stddef.h>#include <stdlib.h>#include <string.h>#include <assert.h>#ifndef __RESTRICT#  define __RESTRICT#endif#ifdef __STL_THREADS# include <stl_threads.h># define __NODE_ALLOCATOR_THREADS true# ifdef __STL_SGI_THREADS  // We test whether threads are in use before locking.  // Perhaps this should be moved into stl_threads.h, but that  // probably makes it harder to avoid the procedure call when  // it isn't needed.    extern "C" {      extern int __us_rsthread_malloc;    }	// The above is copied from malloc.h.  Including <malloc.h>	// would be cleaner but fails with certain levels of standard	// conformance.#   define __NODE_ALLOCATOR_LOCK if (threads && __us_rsthread_malloc) \                { _S_node_allocator_lock._M_acquire_lock(); }#   define __NODE_ALLOCATOR_UNLOCK if (threads && __us_rsthread_malloc) \                { _S_node_allocator_lock._M_release_lock(); }# else /* !__STL_SGI_THREADS */#   define __NODE_ALLOCATOR_LOCK \        { if (threads) _S_node_allocator_lock._M_acquire_lock(); }#   define __NODE_ALLOCATOR_UNLOCK \        { if (threads) _S_node_allocator_lock._M_release_lock(); }# endif#else//  Thread-unsafe#   define __NODE_ALLOCATOR_LOCK#   define __NODE_ALLOCATOR_UNLOCK#   define __NODE_ALLOCATOR_THREADS false#endif__STL_BEGIN_NAMESPACE#if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)#pragma set woff 1174#endif// Malloc-based allocator.  Typically slower than default alloc below.// Typically thread-safe and more storage efficient.#ifdef __STL_STATIC_TEMPLATE_MEMBER_BUG# ifdef __DECLARE_GLOBALS_HERE    void (* __malloc_alloc_oom_handler)() = 0;    // g++ 2.7.2 does not handle static template data members.# else    extern void (* __malloc_alloc_oom_handler)();# endif#endiftemplate <int __inst>class __malloc_alloc_template {private:  static void* _S_oom_malloc(size_t);  static void* _S_oom_realloc(void*, size_t);#ifndef __STL_STATIC_TEMPLATE_MEMBER_BUG  static void (* __malloc_alloc_oom_handler)();#endifpublic:  static void* allocate(size_t __n)  {    void* __result = malloc(__n);    if (0 == __result) __result = _S_oom_malloc(__n);    return __result;  }  static void deallocate(void* __p, size_t /* __n */)  {    free(__p);  }  static void* reallocate(void* __p, size_t /* old_sz */, size_t __new_sz)  {    void* __result = realloc(__p, __new_sz);    if (0 == __result) __result = _S_oom_realloc(__p, __new_sz);    return __result;  }  static void (* __set_malloc_handler(void (*__f)()))()  {    void (* __old)() = __malloc_alloc_oom_handler;    __malloc_alloc_oom_handler = __f;    return(__old);  }};// malloc_alloc out-of-memory handling#ifndef __STL_STATIC_TEMPLATE_MEMBER_BUGtemplate <int __inst>void (* __malloc_alloc_template<__inst>::__malloc_alloc_oom_handler)() = 0;#endiftemplate <int __inst>void*__malloc_alloc_template<__inst>::_S_oom_malloc(size_t __n){    void (* __my_malloc_handler)();    void* __result;    for (;;) {        __my_malloc_handler = __malloc_alloc_oom_handler;        if (0 == __my_malloc_handler) { __THROW_BAD_ALLOC; }        (*__my_malloc_handler)();        __result = malloc(__n);        if (__result) return(__result);    }}template <int __inst>void* __malloc_alloc_template<__inst>::_S_oom_realloc(void* __p, size_t __n){    void (* __my_malloc_handler)();    void* __result;    for (;;) {        __my_malloc_handler = __malloc_alloc_oom_handler;        if (0 == __my_malloc_handler) { __THROW_BAD_ALLOC; }        (*__my_malloc_handler)();        __result = realloc(__p, __n);        if (__result) return(__result);    }}typedef __malloc_alloc_template<0> malloc_alloc;template<class _Tp, class _Alloc>class simple_alloc {public:    static _Tp* allocate(size_t __n)      { return 0 == __n ? 0 : (_Tp*) _Alloc::allocate(__n * sizeof (_Tp)); }    static _Tp* allocate(void)      { return (_Tp*) _Alloc::allocate(sizeof (_Tp)); }    static void deallocate(_Tp* __p, size_t __n)      { if (0 != __n) _Alloc::deallocate(__p, __n * sizeof (_Tp)); }    static void deallocate(_Tp* __p)      { _Alloc::deallocate(__p, sizeof (_Tp)); }};// Allocator adaptor to check size arguments for debugging.// Reports errors using assert.  Checking can be disabled with// NDEBUG, but it's far better to just use the underlying allocator// instead when no checking is desired.// There is some evidence that this can confuse Purify.template <class _Alloc>class debug_alloc {private:  enum {_S_extra = 8};  // Size of space used to store size.  Note                        // that this must be large enough to preserve                        // alignment.public:  static void* allocate(size_t __n)  {    char* __result = (char*)_Alloc::allocate(__n + (int) _S_extra);    *(size_t*)__result = __n;    return __result + (int) _S_extra;  }  static void deallocate(void* __p, size_t __n)  {    char* __real_p = (char*)__p - (int) _S_extra;    assert(*(size_t*)__real_p == __n);    _Alloc::deallocate(__real_p, __n + (int) _S_extra);  }  static void* reallocate(void* __p, size_t __old_sz, size_t __new_sz)  {    char* __real_p = (char*)__p - (int) _S_extra;    assert(*(size_t*)__real_p == __old_sz);    char* __result = (char*)      _Alloc::reallocate(__real_p, __old_sz + (int) _S_extra,                                   __new_sz + (int) _S_extra);    *(size_t*)__result = __new_sz;    return __result + (int) _S_extra;  }};# ifdef __USE_MALLOCtypedef malloc_alloc alloc;typedef malloc_alloc single_client_alloc;# else// Default node allocator.// With a reasonable compiler, this should be roughly as fast as the// original STL class-specific allocators, but with less fragmentation.// Default_alloc_template parameters are experimental and MAY// DISAPPEAR in the future.  Clients should just use alloc for now.//// Important implementation properties:// 1. If the client request an object of size > _MAX_BYTES, the resulting//    object will be obtained directly from malloc.// 2. In all other cases, we allocate an object of size exactly//    _S_round_up(requested_size).  Thus the client has enough size//    information that we can return the object to the proper free list//    without permanently losing part of the object.//// The first template parameter specifies whether more than one thread// may use this allocator.  It is safe to allocate an object from// one instance of a default_alloc and deallocate it with another// one.  This effectively transfers its ownership to the second one.// This may have undesirable effects on reference locality.// The second parameter is unreferenced and serves only to allow the// creation of multiple default_alloc instances.// Node that containers built on different allocator instances have// different types, limiting the utility of this approach.#if defined(__SUNPRO_CC) || defined(__GNUC__)// breaks if we make these template class members:  enum {_ALIGN = 8};  enum {_MAX_BYTES = 128};  enum {_NFREELISTS = 16}; // _MAX_BYTES/_ALIGN#endiftemplate <bool threads, int inst>class __default_alloc_template {private:  // Really we should use static const int x = N  // instead of enum { x = N }, but few compilers accept the former.#if ! (defined(__SUNPRO_CC) || defined(__GNUC__))    enum {_ALIGN = 8};    enum {_MAX_BYTES = 128};    enum {_NFREELISTS = 16}; // _MAX_BYTES/_ALIGN# endif  static size_t  _S_round_up(size_t __bytes)     { return (((__bytes) + (size_t) _ALIGN-1) & ~((size_t) _ALIGN - 1)); }__PRIVATE:  union _Obj {        union _Obj* _M_free_list_link;        char _M_client_data[1];    /* The client sees this.        */  };private:# if defined(__SUNPRO_CC) || defined(__GNUC__) || defined(__HP_aCC)    static _Obj* __STL_VOLATILE _S_free_list[];         // Specifying a size results in duplicate def for 4.1# else    static _Obj* __STL_VOLATILE _S_free_list[_NFREELISTS]; # endif  static  size_t _S_freelist_index(size_t __bytes) {        return (((__bytes) + (size_t)_ALIGN-1)/(size_t)_ALIGN - 1);  }  // Returns an object of size __n, and optionally adds to size __n free list.  static void* _S_refill(size_t __n);  // Allocates a chunk for nobjs of size size.  nobjs may be reduced  // if it is inconvenient to allocate the requested number.  static char* _S_chunk_alloc(size_t __size, int& __nobjs);  // Chunk allocation state.  static char* _S_start_free;  static char* _S_end_free;  static size_t _S_heap_size;# ifdef __STL_THREADS    static _STL_mutex_lock _S_node_allocator_lock;# endif    // It would be nice to use _STL_auto_lock here.  But we    // don't need the NULL check.  And we do need a test whether    // threads have actually been started.    class _Lock;    friend class _Lock;    class _Lock {        public:            _Lock() { __NODE_ALLOCATOR_LOCK; }            ~_Lock() { __NODE_ALLOCATOR_UNLOCK; }    };public:  /* __n must be > 0      */  static void* allocate(size_t __n)  {    void* __ret = 0;    if (__n > (size_t) _MAX_BYTES) {      __ret = malloc_alloc::allocate(__n);    }    else {      _Obj* __STL_VOLATILE* __my_free_list          = _S_free_list + _S_freelist_index(__n);      // Acquire the lock here with a constructor call.      // This ensures that it is released in exit or during stack      // unwinding.#     ifndef _NOTHREADS      /*REFERENCED*/      _Lock __lock_instance;#     endif      _Obj* __RESTRICT __result = *__my_free_list;      if (__result == 0)        __ret = _S_refill(_S_round_up(__n));      else {        *__my_free_list = __result -> _M_free_list_link;        __ret = __result;      }    }    return __ret;  };  /* __p may not be 0 */  static void deallocate(void* __p, size_t __n)  {    if (__n > (size_t) _MAX_BYTES)      malloc_alloc::deallocate(__p, __n);    else {      _Obj* __STL_VOLATILE*  __my_free_list          = _S_free_list + _S_freelist_index(__n);      _Obj* __q = (_Obj*)__p;      // acquire lock#       ifndef _NOTHREADS      /*REFERENCED*/      _Lock __lock_instance;#       endif /* _NOTHREADS */      __q -> _M_free_list_link = *__my_free_list;      *__my_free_list = __q;      // lock is released here    }  }  static void* reallocate(void* __p, size_t __old_sz, size_t __new_sz);} ;typedef __default_alloc_template<__NODE_ALLOCATOR_THREADS, 0> alloc;typedef __default_alloc_template<false, 0> single_client_alloc;template <bool __threads, int __inst>inline bool operator==(const __default_alloc_template<__threads, __inst>&,                       const __default_alloc_template<__threads, __inst>&){  return true;}# ifdef __STL_FUNCTION_TMPL_PARTIAL_ORDERtemplate <bool __threads, int __inst>inline bool operator!=(const __default_alloc_template<__threads, __inst>&,                       const __default_alloc_template<__threads, __inst>&){  return false;}# endif /* __STL_FUNCTION_TMPL_PARTIAL_ORDER *//* We allocate memory in large chunks in order to avoid fragmenting     *//* the malloc heap too much.                                            *//* We assume that size is properly aligned.                             *//* We hold the allocation lock.                                         */template <bool __threads, int __inst>char*__default_alloc_template<__threads, __inst>::_S_chunk_alloc(size_t __size,                                                             int& __nobjs){    char* __result;    size_t __total_bytes = __size * __nobjs;    size_t __bytes_left = _S_end_free - _S_start_free;    if (__bytes_left >= __total_bytes) {        __result = _S_start_free;        _S_start_free += __total_bytes;        return(__result);    } else if (__bytes_left >= __size) {        __nobjs = (int)(__bytes_left/__size);        __total_bytes = __size * __nobjs;        __result = _S_start_free;        _S_start_free += __total_bytes;        return(__result);    } else {        size_t __bytes_to_get = 	  2 * __total_bytes + _S_round_up(_S_heap_size >> 4);        // Try to make use of the left-over piece.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美美女激情18p| 94-欧美-setu| 国产成人福利片| caoporn国产一区二区| 欧美系列一区二区| 久久久亚洲欧洲日产国码αv| 亚洲激情中文1区| 国产精品一区二区三区网站| 成人国产精品免费观看视频| 91精品国产入口在线| 国产精品的网站| 国产在线精品一区二区不卡了| av网站免费线看精品| 日韩美一区二区三区| 亚洲免费av高清| 亚洲一级片在线观看| eeuss鲁一区二区三区| 日韩亚洲欧美一区二区三区| 一区二区在线免费| 国产成人一区在线| 久久噜噜亚洲综合| 男人操女人的视频在线观看欧美| 成人性生交大片免费看中文 | jizz一区二区| 日韩欧美国产1| 亚洲成人先锋电影| 成人不卡免费av| 国产三级一区二区三区| 久久精品久久99精品久久| 欧美视频一区二区三区在线观看| 日本一区二区三区四区| 久久精品国产精品亚洲精品| 欧美性生交片4| 亚洲欧洲中文日韩久久av乱码| 韩国av一区二区三区| 欧美狂野另类xxxxoooo| 一区二区三区鲁丝不卡| 91在线视频播放| 亚洲视频在线观看一区| 成人高清免费观看| 国产欧美日韩精品a在线观看| 久久se精品一区精品二区| 7777精品伊人久久久大香线蕉的 | 亚洲精品国产成人久久av盗摄| 国产在线精品不卡| 日韩欧美一卡二卡| 久久精品日韩一区二区三区| 懂色一区二区三区免费观看| 久久精品一级爱片| 国产精品亚洲人在线观看| 日韩欧美不卡在线观看视频| 午夜精品在线视频一区| 色婷婷亚洲综合| 亚洲私人黄色宅男| 欧美在线综合视频| 亚洲最大色网站| 欧美一区二区精品| 国产精品99久久久久久久vr| 欧美日韩在线亚洲一区蜜芽| 亚洲国产成人av| 精品久久久久久久一区二区蜜臀| 精品一二三四在线| 亚洲特级片在线| 欧美在线观看视频在线| 韩国欧美一区二区| 国产精品情趣视频| 欧洲在线/亚洲| 日韩**一区毛片| 久久久久久久久久久久久女国产乱 | 亚洲精品久久7777| 欧美日韩一卡二卡三卡 | 国产欧美日韩三区| 91视频.com| 午夜日韩在线观看| 精品久久久久久无| 99久久亚洲一区二区三区青草| 亚洲精品乱码久久久久久日本蜜臀| 欧美日韩亚洲不卡| 麻豆91精品视频| 中文字幕一区日韩精品欧美| 91网站最新地址| 琪琪一区二区三区| 国产精品久久久久久久第一福利 | 成人自拍视频在线观看| 亚洲综合免费观看高清完整版| 久久久久久久久一| 欧日韩精品视频| 成人福利电影精品一区二区在线观看| 亚洲夂夂婷婷色拍ww47| 欧美变态口味重另类| 欧美日韩久久久| 成人一级片网址| 国产一区二区三区在线观看免费视频 | 亚洲三级视频在线观看| 久久中文字幕电影| 欧美日韩久久久一区| 高清shemale亚洲人妖| 亚洲丰满少妇videoshd| 国产人妖乱国产精品人妖| 99国产精品国产精品久久| 美女mm1313爽爽久久久蜜臀| 亚洲视频一区在线| 日韩三级免费观看| 在线中文字幕不卡| 国产一区二区在线观看视频| 亚洲福利一区二区| 国产精品麻豆久久久| 51精品国自产在线| 欧美亚男人的天堂| 99久久国产综合精品色伊| 紧缚捆绑精品一区二区| 亚洲成a人片在线不卡一二三区| 国产精品青草久久| 久久免费国产精品| 日韩久久久久久| 欧美日韩一区三区四区| 成人午夜精品在线| 久久福利视频一区二区| 亚洲va国产va欧美va观看| 亚洲欧美日韩人成在线播放| 国产欧美综合在线| 日韩视频免费观看高清完整版在线观看 | 日韩二区三区四区| 亚洲国产成人tv| 亚洲午夜一二三区视频| 亚洲免费观看视频| 亚洲摸摸操操av| 亚洲色图欧美激情| 亚洲乱码中文字幕综合| 亚洲乱码中文字幕| 亚洲精品视频在线看| 国产精品高潮呻吟| 亚洲乱码日产精品bd| 亚洲美腿欧美偷拍| 一个色综合av| 亚洲影视在线播放| 亚洲一区二区黄色| 日本成人在线不卡视频| 免费在线观看视频一区| 欧美aaaaa成人免费观看视频| 麻豆精品一区二区综合av| 精品一区二区三区免费毛片爱| 久久99国产精品麻豆| 国产乱码一区二区三区| 国产成人一区在线| 日本韩国欧美在线| 欧美日韩视频在线一区二区| 欧美日韩亚洲综合一区二区三区| 欧美人牲a欧美精品| 欧美成人一区二区三区在线观看 | 久久久久久久久岛国免费| 国产偷v国产偷v亚洲高清| 2020国产精品| 日韩欧美www| 国产亚洲精品精华液| 亚洲免费观看高清完整版在线观看 | 欧美亚洲一区二区在线| 欧美成人在线直播| 综合中文字幕亚洲| 丝瓜av网站精品一区二区| 国产在线精品不卡| 色婷婷综合久久久| 日韩三级在线免费观看| 国产精品久久久久桃色tv| 五月天一区二区三区| 国产激情一区二区三区四区| 一本久久综合亚洲鲁鲁五月天| 欧美精品三级日韩久久| 国产欧美一区二区三区在线看蜜臀| 国产精品九色蝌蚪自拍| 日本午夜精品视频在线观看 | 亚洲精品国产a| 美女久久久精品| 色综合天天综合网天天看片| 欧美精品在欧美一区二区少妇| 2022国产精品视频| 亚洲一区日韩精品中文字幕| 国产一区三区三区| 欧美色视频一区| 欧美国产丝袜视频| 琪琪一区二区三区| 在线精品亚洲一区二区不卡| 久久午夜羞羞影院免费观看| 一个色妞综合视频在线观看| 国产河南妇女毛片精品久久久 | 国产精品18久久久久久久久 | 日日夜夜免费精品视频| 91在线看国产| 久久精品夜色噜噜亚洲a∨| 婷婷综合另类小说色区| 一本久久精品一区二区| 国产肉丝袜一区二区| 奇米亚洲午夜久久精品| 欧美午夜一区二区| 中文字幕一区二区三区精华液| 激情另类小说区图片区视频区| 欧美视频一区二| 亚洲欧美韩国综合色| 粉嫩蜜臀av国产精品网站| 久久网站热最新地址|