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

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

?? pthread_alloc

?? 粗慥集成算法集合 ,并有詳細的文檔資料和測試數據處
??
?? 第 1 頁 / 共 2 頁
字號:
    } else if (__bytes_left >= __p_size) {
        __nobjs = __bytes_left/__p_size;
        __total_bytes = __p_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.
        if (__bytes_left > 0) {
            _Pthread_alloc_per_thread_state<_Max_size>* __a = 
                (_Pthread_alloc_per_thread_state<_Max_size>*)
			pthread_getspecific(_S_key);
            __obj * volatile * __my_free_list =
                        __a->__free_list + _S_freelist_index(__bytes_left);

            ((__obj *)_S_start_free) -> __free_list_link = *__my_free_list;
            *__my_free_list = (__obj *)_S_start_free;
        }
#       ifdef _SGI_SOURCE
          // Try to get memory that's aligned on something like a
          // cache line boundary, so as to avoid parceling out
          // parts of the same line to different threads and thus
          // possibly different processors.
          {
            const int __cache_line_size = 128;  // probable upper bound
            __bytes_to_get &= ~(__cache_line_size-1);
            _S_start_free = (char *)memalign(__cache_line_size, __bytes_to_get); 
            if (0 == _S_start_free) {
              _S_start_free = (char *)__malloc_alloc<0>::allocate(__bytes_to_get);
            }
          }
#       else  /* !SGI_SOURCE */
          _S_start_free = (char *)__malloc_alloc<0>::allocate(__bytes_to_get);
#       endif
        _S_heap_size += __bytes_to_get;
        _S_end_free = _S_start_free + __bytes_to_get;
    }
  }
  // lock is released here
  return(_S_chunk_alloc(__p_size, __nobjs));
}


/* Returns an object of size n, and optionally adds to size n free list.*/
/* We assume that n is properly aligned.                                */
/* We hold the allocation lock.                                         */
template <size_t _Max_size>
void *_Pthread_alloc_per_thread_state<_Max_size>
::_M_refill(size_t __n)
{
    int __nobjs = 128;
    char * __chunk =
	_Pthread_alloc_template<_Max_size>::_S_chunk_alloc(__n, __nobjs);
    __obj * volatile * __my_free_list;
    __obj * __result;
    __obj * __current_obj, * __next_obj;
    int __i;

    if (1 == __nobjs)  {
        return(__chunk);
    }
    __my_free_list = __free_list
		 + _Pthread_alloc_template<_Max_size>::_S_freelist_index(__n);

    /* Build free list in chunk */
      __result = (__obj *)__chunk;
      *__my_free_list = __next_obj = (__obj *)(__chunk + __n);
      for (__i = 1; ; __i++) {
        __current_obj = __next_obj;
        __next_obj = (__obj *)((char *)__next_obj + __n);
        if (__nobjs - 1 == __i) {
            __current_obj -> __free_list_link = 0;
            break;
        } else {
            __current_obj -> __free_list_link = __next_obj;
        }
      }
    return(__result);
}

template <size_t _Max_size>
void *_Pthread_alloc_template<_Max_size>
::reallocate(void *__p, size_t __old_sz, size_t __new_sz)
{
    void * __result;
    size_t __copy_sz;

    if (__old_sz > _Max_size
	&& __new_sz > _Max_size) {
        return(realloc(__p, __new_sz));
    }
    if (_S_round_up(__old_sz) == _S_round_up(__new_sz)) return(__p);
    __result = allocate(__new_sz);
    __copy_sz = __new_sz > __old_sz? __old_sz : __new_sz;
    memcpy(__result, __p, __copy_sz);
    deallocate(__p, __old_sz);
    return(__result);
}

#if __STL_STATIC_TEMPLATE_DATA > 0
template <size_t _Max_size>
_Pthread_alloc_per_thread_state<_Max_size> *
_Pthread_alloc_template<_Max_size>::_S_free_per_thread_states = 0;

template <size_t _Max_size>
pthread_key_t _Pthread_alloc_template<_Max_size>::_S_key;

template <size_t _Max_size>
bool _Pthread_alloc_template<_Max_size>::_S_key_initialized = false;

template <size_t _Max_size>
pthread_mutex_t _Pthread_alloc_template<_Max_size>::_S_chunk_allocator_lock
= PTHREAD_MUTEX_INITIALIZER;

template <size_t _Max_size>
char *_Pthread_alloc_template<_Max_size>
::_S_start_free = 0;

template <size_t _Max_size>
char *_Pthread_alloc_template<_Max_size>
::_S_end_free = 0;

template <size_t _Max_size>
size_t _Pthread_alloc_template<_Max_size>
::_S_heap_size = 0;
# endif

template <class _Tp>
class pthread_allocator {
  typedef pthread_alloc _S_Alloc;          // The underlying allocator.
public:
  typedef size_t     size_type;
  typedef ptrdiff_t  difference_type;
  typedef _Tp*       pointer;
  typedef const _Tp* const_pointer;
  typedef _Tp&       reference;
  typedef const _Tp& const_reference;
  typedef _Tp        value_type;

#ifdef __STL_MEMBER_TEMPLATE_CLASSES
  template <class _NewType> struct rebind {
    typedef pthread_allocator<_NewType> other;
  };
#endif

  pthread_allocator() __STL_NOTHROW {}
  pthread_allocator(const pthread_allocator<_Tp>& a) __STL_NOTHROW {}

#if defined (__STL_MEMBER_TEMPLATES) && defined (__STL_FUNCTION_PARTIAL_ORDER)
  template <class _OtherType> pthread_allocator(const pthread_allocator<_OtherType>&)
		__STL_NOTHROW {}
#endif

  ~pthread_allocator() __STL_NOTHROW {}

  pointer address(reference __x) const { return &__x; }
  const_pointer address(const_reference __x) const { return &__x; }

  // __n is permitted to be 0.  The C++ standard says nothing about what
  // the return value is when __n == 0.
  _Tp* allocate(size_type __n, const void* = 0) {
    return __n != 0 ? __STATIC_CAST(_Tp*,_S_Alloc::allocate(__n * sizeof(_Tp)))
                    : 0;
  }

  // p is not permitted to be a null pointer.
  void deallocate(pointer __p, size_type __n)
    { _S_Alloc::deallocate(__p, __n * sizeof(_Tp)); }

  size_type max_size() const __STL_NOTHROW 
    { return size_t(-1) / sizeof(_Tp); }

  void construct(pointer __p, const _Tp& __val) { __STL_PLACEMENT_NEW (__p) _Tp(__val); }
  void destroy(pointer _p) { _p->~_Tp(); }
};

__STL_TEMPLATE_NULL
class pthread_allocator<void> {
public:
  typedef size_t      size_type;
  typedef ptrdiff_t   difference_type;
  typedef void*       pointer;
  typedef const void* const_pointer;
  typedef void        value_type;
#ifdef __STL_MEMBER_TEMPLATE_CLASSES
  template <class _NewType> struct rebind {
    typedef pthread_allocator<_NewType> other;
  };
#endif
};

/*
template <size_t _Max_size>
inline bool operator==(const _Pthread_alloc_template<_Max_size>&,
                       const _Pthread_alloc_template<_Max_size>&)
{
  return true;
}
*/

template <class _T1, class _T2>
inline bool operator==(const pthread_allocator<_T1>&,
                       const pthread_allocator<_T2>& a2) 
{
  return true;
}

#ifdef __STL_FUNCTION_TMPL_PARTIAL_ORDER
template <class _T1, class _T2>
inline bool operator!=(const pthread_allocator<_T1>&,
                       const pthread_allocator<_T2>&)
{
  return false;
}
#endif

#ifdef __STL_CLASS_PARTIAL_SPECIALIZATION
template <class _Tp, size_t _Max_size>
struct _Alloc_traits<_Tp, _Pthread_alloc_template<_Max_size> >
{
  typedef __allocator<_Tp, _Pthread_alloc_template<_Max_size> > 
          allocator_type;
};

/*
template <class _Tp, class _Atype, size_t _Max>
struct _Alloc_traits<_Tp, __allocator<_Atype, _Pthread_alloc_template<_Max> > >
{
  typedef __allocator<_Tp, _Pthread_alloc_template<_Max> > allocator_type;
};
*/

template <class _Tp, class _Atype>
struct _Alloc_traits<_Tp, pthread_allocator<_Atype> >
{
  typedef pthread_allocator<_Tp> allocator_type;
};

#endif

#if !defined (__STL_MEMBER_TEMPLATE_CLASSES)

template <class _Tp1, class _Tp2>
inline allocator<_Tp2>
__stl_alloc_rebind(pthread_allocator<_Tp1>&, const _Tp2*, __false_type) {
  return allocator<_Tp2>();
}

#endif /* __STL_MEMBER_TEMPLATE_CLASSES */

__STL_END_NAMESPACE

#endif /* __SGI_STL_PTHREAD_ALLOC */

// Local Variables:
// mode:C++
// End:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av在线播放成人| 国产一区二区不卡| 亚洲视频免费看| 中文字幕精品一区二区精品绿巨人| 欧美精品视频www在线观看| 欧美亚洲国产bt| 国产精品全国免费观看高清 | 久久综合中文字幕| 国产精品久久久久婷婷二区次 | 欧美日韩一卡二卡三卡| 久久久精品日韩欧美| 日韩成人一区二区| 色又黄又爽网站www久久| 精品国偷自产国产一区| 午夜婷婷国产麻豆精品| 92精品国产成人观看免费| 精品91自产拍在线观看一区| 日韩成人一区二区| 欧美体内she精高潮| 日韩毛片精品高清免费| 国产成人免费高清| 26uuu国产电影一区二区| 国产乱码一区二区三区| 在线电影院国产精品| 亚洲三级在线免费观看| 国产91精品露脸国语对白| 日韩欧美亚洲国产精品字幕久久久 | 久久久久99精品一区| 黄网站免费久久| 久久久久久久久久久黄色| 免费亚洲电影在线| 日韩免费电影一区| 麻豆成人久久精品二区三区小说| 欧美日韩精品欧美日韩精品一 | www.欧美色图| 欧美激情一区二区三区全黄| 国产成人亚洲综合a∨猫咪| 久久久99久久| 成人一级片在线观看| 国产亚洲精品bt天堂精选| 国产91综合网| 国产精品二三区| 色综合中文字幕| 一二三区精品视频| 欧美老年两性高潮| 久久99精品国产麻豆婷婷洗澡| 日韩欧美一区二区视频| 99vv1com这只有精品| 樱桃视频在线观看一区| 在线精品视频免费播放| 奇米在线7777在线精品 | 精品在线播放午夜| 久久男人中文字幕资源站| 成人污视频在线观看| 亚洲欧美色图小说| 9191成人精品久久| 国产一区二区精品久久| 国产精品麻豆视频| 欧美丝袜丝交足nylons图片| 免费精品99久久国产综合精品| 国产性天天综合网| 日本高清不卡一区| 免播放器亚洲一区| 国产婷婷一区二区| 在线观看视频91| 紧缚捆绑精品一区二区| 亚洲三级久久久| 91麻豆精品国产| 国产成人超碰人人澡人人澡| 亚洲永久免费视频| 久久精品一区八戒影视| 91丨porny丨户外露出| 日韩福利视频网| 国产精品全国免费观看高清| 欧美视频在线一区二区三区 | 成人午夜av电影| 亚洲成在人线免费| 国产三级精品视频| 欧美片在线播放| 99免费精品在线观看| 蜜臀久久99精品久久久画质超高清| 国产精品免费久久久久| 日韩一级免费一区| 在线观看视频一区二区欧美日韩| 国产精品亚洲一区二区三区在线| 亚洲午夜在线电影| 日本一二三不卡| 日韩亚洲国产中文字幕欧美| 色哟哟在线观看一区二区三区| 经典三级视频一区| 日本午夜精品一区二区三区电影| 国产精品视频一区二区三区不卡| 制服丝袜亚洲播放| 欧美色图一区二区三区| av在线播放一区二区三区| 国产乱码精品1区2区3区| 日韩成人午夜精品| 亚洲成a人v欧美综合天堂| 亚洲人吸女人奶水| 国产精品无圣光一区二区| 日韩精品在线一区| 欧美一区二区私人影院日本| 在线一区二区三区四区| 91小宝寻花一区二区三区| 成人一级黄色片| 国产高清不卡一区二区| 精品在线亚洲视频| 激情小说亚洲一区| 美女视频黄久久| 无码av免费一区二区三区试看| 一区二区三区不卡视频| 一区二区成人在线| 亚洲精品日韩综合观看成人91| 自拍偷拍亚洲综合| 亚洲欧洲精品天堂一级| 中文字幕一区av| 亚洲欧美成aⅴ人在线观看| 亚洲美女一区二区三区| 一区二区视频在线| 玉米视频成人免费看| 亚洲国产一二三| 亚洲大片精品永久免费| 视频一区视频二区中文| 日韩成人av影视| 精品一区在线看| 粉嫩av亚洲一区二区图片| 高清成人免费视频| 91美女在线看| 欧美日韩综合在线| 欧美一二三区在线| 国产欧美综合在线观看第十页| 欧美激情一区二区| 一区二区三区日韩欧美| 午夜不卡av在线| 久草精品在线观看| 粉嫩aⅴ一区二区三区四区五区| 99免费精品在线观看| 欧美三级乱人伦电影| 精品理论电影在线| 国产精品福利电影一区二区三区四区 | 欧美成人vr18sexvr| 国产亚洲欧美日韩在线一区| 亚洲欧洲99久久| 日韩av一级片| 国产福利一区二区三区视频在线 | 精品视频全国免费看| 日韩西西人体444www| 中文字幕av不卡| 亚洲综合清纯丝袜自拍| 国产永久精品大片wwwapp| av一本久道久久综合久久鬼色| 欧美私人免费视频| 久久久国产综合精品女国产盗摄| 亚洲视频香蕉人妖| 极品美女销魂一区二区三区免费| 99天天综合性| 日韩三级高清在线| 亚洲人成网站影音先锋播放| 蜜臀av性久久久久蜜臀aⅴ四虎 | 国产精品久久久久久久久搜平片| 亚洲国产wwwccc36天堂| 国产精品自拍在线| 欧美区视频在线观看| 国产精品福利影院| 久久精品国产成人一区二区三区| 97久久久精品综合88久久| 日韩欧美一二三四区| 亚洲综合一区二区三区| 懂色av中文字幕一区二区三区 | 91在线精品一区二区| 日韩视频永久免费| 一区二区欧美在线观看| av在线播放一区二区三区| 精品成人免费观看| 午夜视频在线观看一区二区| 91影院在线免费观看| 国产欧美日本一区二区三区| 日本成人超碰在线观看| 欧美综合色免费| 国产精品久久国产精麻豆99网站 | 99re这里只有精品视频首页| 精品99一区二区| 欧美aaaaa成人免费观看视频| 欧美自拍偷拍午夜视频| 亚洲视频综合在线| 成人爱爱电影网址| 久久精品综合网| 精品在线观看免费| 欧美tickling网站挠脚心| 日韩国产精品大片| 4438成人网| 日韩中文字幕一区二区三区| 日本黄色一区二区| 亚洲欧美国产毛片在线| 99久久免费精品高清特色大片| 欧美高清在线视频| eeuss鲁片一区二区三区 | 国产午夜亚洲精品午夜鲁丝片| 日韩av一区二区在线影视| 欧美男男青年gay1069videost|