//usr/lib64/lib64//lib64//python2.7/ó
ÛœSec @ s
d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z m
Z
d d l m Z d g Z
e j d k rÇ d d l m Z d e f d „ ƒ YZ n d e f d „ ƒ YZ d
e f d „ ƒ YZ d e f d „ ƒ YZ d S(
iÿÿÿÿN( t Finalizet info( t assert_spawningt
BufferWrappert win32( R t Arenac B s/ e Z e j ƒ Z d „ Z d „ Z d „ Z RS( c C sƒ | | _ d t j ƒ t j j ƒ f | _ t j d | j d | j ƒ| _ t j
ƒ d k sj t d ƒ ‚ | j | j f | _ d S( Ns pym-%d-%diÿÿÿÿt tagnamei s tagname already in use(
t sizet ost getpidR t _countert nextt namet mmapt bufferR t GetLastErrort AssertionErrort _state( t selfR ( ( s, /usr/lib64/python2.7/multiprocessing/heap.pyt __init__= s
"!c C s t | ƒ | j S( N( R R ( R ( ( s, /usr/lib64/python2.7/multiprocessing/heap.pyt __getstate__D s
c C sY | \ | _ | _ | _ t j d | j d | j ƒ| _ t j ƒ t j k sU t ‚ d S( NiÿÿÿÿR ( R R R R
R R R t ERROR_ALREADY_EXISTSR ( R t state( ( s, /usr/lib64/python2.7/multiprocessing/heap.pyt __setstate__H s !( t __name__t
__module__t itertoolst countR
R R R ( ( ( s, /usr/lib64/python2.7/multiprocessing/heap.pyR 9 s c B s e Z d „ Z RS( c C s+ t j d | ƒ | _ | | _ d | _ d S( Niÿÿÿÿ( R
R R t NoneR ( R R ( ( s, /usr/lib64/python2.7/multiprocessing/heap.pyR Q s ( R R R ( ( ( s, /usr/lib64/python2.7/multiprocessing/heap.pyR O s t Heapc B sb e Z d Z e j d „ Z e d „ ƒ Z d „ Z d „ Z d „ Z
d „ Z d „ Z d „ Z
RS( i c C sm t j ƒ | _ t j ƒ | _ | | _ g | _ i | _ i | _ i | _
t ƒ | _ g | _
g | _ d S( N( R R t _lastpidt threadingt Lockt _lockt _sizet _lengthst _len_to_seqt _start_to_blockt _stop_to_blockt sett _allocated_blockst _arenast _pending_free_blocks( R R ( ( s, /usr/lib64/python2.7/multiprocessing/heap.pyR ^ s c C s | d } | | | @S( Ni ( ( t nt alignmentt mask( ( s, /usr/lib64/python2.7/multiprocessing/heap.pyt _roundupk s
c C s t j | j | ƒ } | t | j ƒ k r | j t | j | ƒ t j ƒ } | j d 9_ t d | ƒ t
| ƒ } | j j | ƒ | d | f S| j | } | j
| } | j ƒ } | sÓ | j
| =| j | =n | \ } } } | j | | f =| j | | f =| S( Ni s" allocating a new mmap of length %di ( t bisectt bisect_leftR# t lenR. t maxR" R
t PAGESIZER R R) t appendR$ t popR% R&