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

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

?? stl_alloc.h

?? 粗慥集成算法集合 ,并有詳細的文檔資料和測試數據處
?? H
?? 第 1 頁 / 共 3 頁
字號:
/*
 *
 * Copyright (c) 1996,1997
 * Silicon Graphics Computer Systems, Inc.
 *
 * Copyright (c) 1997
 * Moscow Center for SPARC Technology
 *
 * Copyright (c) 1999 
 * Boris Fomitchev
 *
 * This material is provided "as is", with absolutely no warranty expressed
 * or implied. Any use is at your own risk.
 *
 * Permission to use or copy this software for any purpose is hereby granted 
 * without fee, provided the above notices are retained on all copies.
 * Permission to modify the code and to distribute modified code is granted,
 * provided the above notices are retained, and a notice that the code was
 * modified is included with the above copyright notice.
 *
 */

/* 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


// 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 __STLPORT_CSTDDEF
#  include <cstddef>
# endif
# ifndef __STLPORT_CSTDLIB
#  include <cstdlib>
# endif
# ifndef __STLPORT_CSTRING
#  include <cstring>
# endif

# ifndef __THROW_BAD_ALLOC
#  if !defined(__STL_USE_EXCEPTIONS)
# if !defined (__STLPORT_CSTDIO)
#  include <cstdio>
# endif
# if !defined (__STLPORT_CSTDLIB)
#  include <cstdlib>
# endif
#   define __THROW_BAD_ALLOC fprintf(stderr, "out of memory\n"); exit(1)
#  else /* !defined(__STL_USE_EXCEPTIONS) */
#   define __THROW_BAD_ALLOC throw bad_alloc()
#  endif /* !defined(__STL_USE_EXCEPTIONS) */
# endif   /* __THROW_BAD_ALLOC */

# ifndef __STLPORT_NEW
#  include <new>
# endif

#if defined (__STL_THREADS) && ! defined (__SGI_STL_INTERNAL_THREADS_H)
# include <stl_threads.h>
#endif

#ifndef __TYPE_TRAITS_H
# include <type_traits.h>
#endif

#ifndef __SGI_STL_INTERNAL_CONSTRUCT_H
# include <stl_construct.h>
#endif

#ifndef __ALLOC
#   define __ALLOC __sgi_alloc
#endif

# ifndef __RESTRICT
#  define __RESTRICT
# endif

# if defined ( __STL_USE_ABBREVS )
// ugliness is intentional - to reduce conflicts probability
#  define __malloc_alloc   M__A
#  define __node_alloc     D__A
#  define __new_alloc      N__A
#  define __debug_alloc    G__A
# endif

#ifdef __STL_THREADS
# 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

#if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
#pragma set woff 1174
#endif
#if defined(__IBMCPP__)
// supress EDC3130: A constant is being used as a conditional expression
#pragma info(nocnd)
#endif

__STL_BEGIN_NAMESPACE

template <class _Tp, class _Alloc>
struct __STLPORT_EXPORT_TEMPLATE __allocator;

// Malloc-based allocator.  Typically slower than default alloc below.
// Typically thread-safe and more storage efficient.

typedef void (* __oom_handler_type)();

template <int __inst>
class __STLPORT_EXPORT_TEMPLATE __malloc_alloc;

template <int __inst>
class __STLPORT_EXPORT_TEMPLATE __malloc_alloc {
private:

  static void* _S_oom_malloc(size_t);
  static void* _S_oom_realloc(void*, size_t);

  static __oom_handler_type __oom_handler;

public:
  // this one is needed for proper simple_alloc wrapping
  typedef char value_type;

# if defined (__STL_MEMBER_TEMPLATE_CLASSES)
  template <class _Tp1> struct rebind {
    typedef __allocator<_Tp1, __malloc_alloc<__inst> > other;
  };
# endif

  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((char*)__p);
    }
# if 0
  static void* reallocate(void* __p, size_t /* old_sz */, size_t __new_sz)
    {
      void* __result = realloc((char*)__p, __new_sz);
      if (0 == __result) __result = _S_oom_realloc(__p, __new_sz);
      return __result;
    }
# endif
  static __oom_handler_type set_malloc_handler(__oom_handler_type __f)
    {
      __oom_handler_type __old = __oom_handler;
      __oom_handler = __f;
      return(__old);
    }
    
};


// New-based allocator.  Typically slower than default alloc below.
// Typically thread-safe and more storage efficient.
class __new_alloc {
public:
  // this one is needed for proper simple_alloc wrapping
  typedef char value_type;

# if defined (__STL_MEMBER_TEMPLATE_CLASSES)
  template <class _Tp1> struct rebind {
    typedef __allocator<_Tp1, __new_alloc > other;
  };
# endif

  static void*  allocate(size_t __n) { 
    return __stl_new(__n);
  }

# if 0
  static void*  reallocate(void *__p, size_t __old_sz, size_t __new_sz) {
    void* __result = allocate(__new_sz);
    size_t __copy_sz = __new_sz > __old_sz? __old_sz : __new_sz;
    memcpy(__result, __p, __copy_sz);
    deallocate(__p, __old_sz);
    return __result;
  }
# endif
  static void deallocate(void* __p, size_t) { 
    __stl_delete(__p);
  }
};


# ifdef __STL_DEBUG_ALLOC
// 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.
// This adaptor can only be applied to raw allocators

template <class _Alloc>
class __debug_alloc : public _Alloc {
public:
  typedef _Alloc __allocator_type;
  typedef typename _Alloc::value_type value_type;
private:
  struct __alloc_header {
    size_t __magic: 16;
    size_t __type_size:16;
    __STL_UINT32_T _M_size;
  }; // that is 8 bytes for sure
  // Sunpro CC has bug on enums, so extra_before/after set explicitly
  enum { __pad=8, __magic=0xdeba, __deleted_magic = 0xdebd,
	 __shred_byte= __STL_SHRED_BYTE
  };

  enum { __extra_before = 16, __extra_after = 8 };
  // Size of space used to store size.  Note
  // that this must be large enough to preserve
  // alignment.
  static size_t __extra_before_chunk() {
    return (long)__extra_before/sizeof(value_type)+
      (size_t)((long)__extra_before%sizeof(value_type)>0);
  }
  static size_t __extra_after_chunk() {
    return (long)__extra_before/sizeof(value_type)+
      (size_t)((long)__extra_after%sizeof(value_type)>0);
  }
public:

# if defined (__STL_MEMBER_TEMPLATE_CLASSES)
  template <class _Tp1> struct rebind {
    typedef __allocator< _Tp1, __debug_alloc<_Alloc> > other;
  };
# endif

  __debug_alloc(const _Alloc&);
  __debug_alloc() {}
  ~__debug_alloc() {}
  static void * allocate(size_t);
  static void   deallocate(void *, size_t);
# if 0
  static void * reallocate(void *, size_t, size_t); 
# endif
};

# endif /* __STL_DEBUG_ALLOC */


// 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(__OS400__)
enum {_ALIGN = 16, _ALIGN_SHIFT=4, _MAX_BYTES = 256};
#  define  _NFREELISTS 16
# else
enum {_ALIGN = 8, _ALIGN_SHIFT=3, _MAX_BYTES = 128};
// SunPro CC 4.0.1 has bug on enums
//  enum {_NFREELISTS = _MAX_BYTES/_ALIGN};
#  define  _NFREELISTS 16
# endif /* __OS400__ */

#define _S_FREELIST_INDEX(__bytes) ((__bytes-size_t(1))>>(int)_ALIGN_SHIFT)

union _Node_alloc_obj;

union _Node_alloc_obj {
  union _Node_alloc_obj * _M_free_list_link;
  char __M_client_data[1];    /* The client sees this.        */
};

template <bool __threads, int __inst>
class __STLPORT_EXPORT_TEMPLATE __node_alloc {
  __PRIVATE:
  static size_t
  _S_round_up(size_t __bytes) 
    { return (((__bytes) + (size_t)_ALIGN-1) & ~((size_t)_ALIGN - 1)); }

  typedef _Node_alloc_obj _Obj;
private:
  static _Obj * __STL_VOLATILE _S_free_list[_NFREELISTS]; 
  static  inline size_t _S_freelist_index(size_t __bytes) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本久久a久久免费精品不卡| 在线成人免费观看| 日韩亚洲欧美中文三级| 夜色激情一区二区| 日本久久精品电影| 亚洲高清视频中文字幕| 欧美卡1卡2卡| 欧美人与禽zozo性伦| 精品在线一区二区| 久久久久久亚洲综合影院红桃| 国产高清亚洲一区| 一区二区三区免费网站| 一区二区三区四区激情| 亚洲精品国产无天堂网2021 | 精品福利av导航| 国产成人在线视频网站| 高清国产午夜精品久久久久久| 最近日韩中文字幕| 欧美这里有精品| 国产在线观看一区二区| 一区二区三区欧美久久| 三级一区在线视频先锋| 中文字幕一区二区三区四区不卡| 欧美福利视频导航| 日韩欧美一区在线| 国产欧美中文在线| 制服丝袜av成人在线看| 色综合 综合色| 欧美精品乱码久久久久久 | 韩国女主播一区二区三区| 综合久久久久久| 亚洲成人动漫在线观看| 亚洲图片另类小说| 午夜精品国产更新| 一区二区三区在线看| 日本不卡一区二区三区高清视频| 一色桃子久久精品亚洲| 五月婷婷久久丁香| 九色综合狠狠综合久久| 粉嫩高潮美女一区二区三区| 欧美在线免费播放| 精品va天堂亚洲国产| 亚洲精品第1页| 亚洲曰韩产成在线| 精品一区二区三区免费| 91在线视频免费观看| 精品综合久久久久久8888| 99久久精品免费观看| 日韩天堂在线观看| 亚洲综合视频在线观看| 国产一区二区不卡在线| 欧美日本高清视频在线观看| 亚洲欧洲在线观看av| 久久国产精品第一页| 蜜臀av一区二区在线免费观看 | 青青草精品视频| 日韩成人免费看| 不卡一区在线观看| 99re亚洲国产精品| 久久婷婷成人综合色| 国产喂奶挤奶一区二区三区| 国产午夜亚洲精品理论片色戒| 亚洲福中文字幕伊人影院| 成人在线综合网| 91亚洲资源网| 欧美视频在线一区二区三区| 欧美午夜一区二区| 国产精品视频观看| 亚洲视频电影在线| 中文在线免费一区三区高中清不卡| 久久久久国色av免费看影院| 天堂一区二区在线免费观看| 欧美在线视频你懂得| 亚洲欧美一区二区久久| 午夜精品在线视频一区| 一本在线高清不卡dvd| 国产精品免费av| 国产福利电影一区二区三区| 欧美一区二区三区系列电影| 欧美一区二区三区色| 日韩专区欧美专区| 欧美日韩精品免费| 亚洲成人先锋电影| 欧美绝品在线观看成人午夜影视| 亚洲在线观看免费| 91精品国产综合久久久蜜臀图片| 丝袜亚洲另类欧美| 日韩欧美电影在线| 自拍偷拍国产精品| 色综合久久88色综合天天6| 亚洲精品乱码久久久久久黑人| 91国在线观看| 五月天激情综合| 欧美大白屁股肥臀xxxxxx| 国产三级精品视频| 高清不卡在线观看av| 自拍偷拍国产精品| 欧美日韩视频在线观看一区二区三区 | 91黄色在线观看| 午夜精品123| 精品区一区二区| av中文字幕在线不卡| 91精品国产麻豆国产自产在线 | 精品成人一区二区三区| 国产91精品露脸国语对白| 亚洲日本丝袜连裤袜办公室| 欧美性猛交xxxx黑人交| 免费成人在线影院| 国产精品拍天天在线| 欧美中文字幕一区| 国产综合色产在线精品| 国产精品久久国产精麻豆99网站| 久久99热国产| 成人欧美一区二区三区视频网页| 欧美中文字幕一区二区三区 | 亚洲一区二区三区免费视频| 欧美一区二区三区在| 国产v日产∨综合v精品视频| 亚洲一区av在线| 国产欧美日韩在线观看| 欧美日韩精品一区二区三区| 国产91综合网| 欧美aaaaa成人免费观看视频| 国产女人18水真多18精品一级做| 欧洲亚洲精品在线| 粉嫩aⅴ一区二区三区四区五区| 亚洲一区二区三区四区在线观看| 精品国产百合女同互慰| 欧美在线视频不卡| 99久久国产综合精品女不卡| 久久精品国产精品亚洲综合| 亚洲精品高清在线观看| 中文字幕 久热精品 视频在线| 这里只有精品视频在线观看| 成人av网站免费观看| 久久激情五月婷婷| 天天综合天天做天天综合| 中文字幕日韩一区| 久久久精品影视| 欧美成人乱码一区二区三区| 欧美日韩美少妇| 在线观看视频欧美| 99久久久无码国产精品| 丁香五精品蜜臀久久久久99网站 | 夜夜嗨av一区二区三区网页| 国产精品久久久久久久久免费樱桃 | 久久精子c满五个校花| 91精品国产91久久久久久一区二区| 91一区二区在线| 99久久亚洲一区二区三区青草| 国产精品中文欧美| 亚洲人成亚洲人成在线观看图片| 国产无一区二区| 久久精品视频一区二区三区| 精品播放一区二区| 久久久综合精品| 国产丝袜欧美中文另类| 精品剧情在线观看| 26uuu久久天堂性欧美| 精品国产第一区二区三区观看体验| 日韩女优视频免费观看| 日韩午夜精品电影| 欧美成人vr18sexvr| 精品久久五月天| 久久精品欧美日韩精品| 国产女人aaa级久久久级| 国产精品青草久久| 亚洲精品国久久99热| 午夜激情综合网| 麻豆专区一区二区三区四区五区| 麻豆中文一区二区| 懂色av一区二区三区免费观看| 成人av小说网| 欧亚洲嫩模精品一区三区| 欧美剧在线免费观看网站| 精品国产三级电影在线观看| 久久久99久久精品欧美| 国产精品美女久久久久aⅴ | 日韩高清不卡在线| 美女网站一区二区| 国产精品一二三四区| 99国内精品久久| 欧美精三区欧美精三区| 精品久久人人做人人爰| 亚洲欧洲精品一区二区三区不卡| 亚洲免费看黄网站| 麻豆精品精品国产自在97香蕉| 国产电影一区二区三区| 在线视频欧美区| 欧美精品一区二区三区蜜臀 | 91精品在线一区二区| 久久久777精品电影网影网 | 中文字幕av不卡| 午夜视频在线观看一区二区| 国产精品一区二区在线观看网站| 91香蕉视频mp4| 精品国产一区二区精华| 亚洲精品欧美二区三区中文字幕| 天天亚洲美女在线视频| 成人18精品视频|