AlkantarClanX12

Your IP : 18.220.112.210


Current Path : /opt/alt/python33/lib64/python3.3/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/multiprocessing/__pycache__/heap.cpython-33.pyo

�
��fec@s�ddlZddlZddlZddlZddlZddlZddlZddlmZm	Z	ddl
mZdgZej
dkr�ddlZGdd�de�ZnGdd�de�ZGd	d
�d
e�ZGdd�de�ZdS(iN(uFinalizeuinfo(uassert_spawningu
BufferWrapperuwin32cBsD|EeZdZej�Zdd�Zdd�Zdd�ZdS(uArenacCse||_dtj�ttj�f|_tjd|jd|j�|_|j|jf|_	dS(Nu	pym-%d-%diutagnamei����(
usizeuosugetpidunextuArenau_counterunameummapubufferu_state(uselfusize((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu__init__#s	"!uArena.__init__cCst|�|jS(N(uassert_spawningu_state(uself((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu__getstate__*s
uArena.__getstate__cCs>|\|_|_|_tjd|jd|j�|_dS(Niutagnamei����(usizeunameu_stateummapubuffer(uselfustate((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu__setstate__.s!uArena.__setstate__N(	u__name__u
__module__u__qualname__u	itertoolsucountu_counteru__init__u__getstate__u__setstate__(u
__locals__((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyuArenasuArenacBs |EeZdZdd�ZdS(uArenacCs+tjd|�|_||_d|_dS(Nii����(ummapubufferusizeuNoneuname(uselfusize((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu__init__7s	uArena.__init__N(u__name__u
__module__u__qualname__u__init__(u
__locals__((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyuArena5scBs�|EeZdZdZejdd�Zedd��Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
dd�ZdS(uHeapicCsmtj�|_tj�|_||_g|_i|_i|_	i|_
t�|_g|_
g|_dS(N(uosugetpidu_lastpidu	threadinguLocku_locku_sizeu_lengthsu_len_to_sequ_start_to_blocku_stop_to_blockusetu_allocated_blocksu_arenasu_pending_free_blocks(uselfusize((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu__init__Ds						u
Heap.__init__cCs|d}|||@S(Ni((unu	alignmentumask((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu_roundupQs
u
Heap._roundupc	Cstj|j|�}|t|j�kr�|jt|j|�tj�}|jd9_t	d|�t
|�}|jj|�|d|fS|j|}|j
|}|j�}|s�|j
|=|j|=n|\}}}|j||f=|j||f=|S(Niu"allocating a new mmap of length %di(ubisectubisect_leftu_lengthsulenu_roundupumaxu_sizeummapuPAGESIZEuinfouArenau_arenasuappendu_len_to_sequpopu_start_to_blocku_stop_to_block(	uselfusizeuiulengthuarenausequblockustartustop((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu_mallocWs"!



uHeap._mallocc	Cs$|\}}}y|j||f}Wntk
r:YnX|j|�\}}y|j||f}Wntk
r{YnX|j|�\}}|||f}||}y|j|j|�Wn5tk
r�|g|j|<tj|j|�YnX||j||f<||j||f<dS(N(	u_stop_to_blockuKeyErroru_absorbu_start_to_blocku_len_to_sequappendubisectuinsortu_lengths(	uselfublockuarenaustartustopu
prev_blocku_u
next_blockulength((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu_freems(



u
Heap._freecCs�|\}}}|j||f=|j||f=||}|j|}|j|�|sv|j|=|jj|�n||fS(N(u_start_to_blocku_stop_to_blocku_len_to_sequremoveu_lengths(uselfublockuarenaustartustopulengthuseq((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu_absorb�s



uHeap._absorbcCsPxIy|jj�}Wntk
r+PYnX|jj|�|j|�qdS(N(u_pending_free_blocksupopu
IndexErroru_allocated_blocksuremoveu_free(uselfublock((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu_free_pending_blocks�s
uHeap._free_pending_blocksc
Cse|jjd�s%|jj|�n<z+|j�|jj|�|j|�Wd|jj	�XdS(NF(
u_lockuacquireuFalseu_pending_free_blocksuappendu_free_pending_blocksu_allocated_blocksuremoveu_freeurelease(uselfublock((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyufree�s
u	Heap.freec
Cs�tj�|jkr"|j�n|jj�|j�z�|jt|d�|j	�}|j
|�\}}}||}||kr�|j|||f�n|||f}|jj
|�|SWd|jj�XdS(Ni(uosugetpidu_lastpidu__init__u_lockuacquireu_free_pending_blocksu_roundupumaxu
_alignmentu_mallocu_freeu_allocated_blocksuaddurelease(uselfusizeuarenaustartustopunew_stopublock((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyumalloc�s



uHeap.mallocN(u__name__u
__module__u__qualname__u
_alignmentummapuPAGESIZEu__init__ustaticmethodu_roundupu_mallocu_freeu_absorbu_free_pending_blocksufreeumalloc(u
__locals__((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyuHeap@s

uHeapcBs5|EeZdZe�Zdd�Zdd�ZdS(u
BufferWrappercCsAtjj|�}||f|_t|tjjd|f�dS(Nuargs(u
BufferWrapperu_heapumallocu_stateuFinalizeufree(uselfusizeublock((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu__init__�suBufferWrapper.__init__cCs3|j\\}}}}t|j�|||�S(N(u_stateu
memoryviewubuffer(uselfuarenaustartustopusize((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyucreate_memoryview�suBufferWrapper.create_memoryviewN(u__name__u
__module__u__qualname__uHeapu_heapu__init__ucreate_memoryview(u
__locals__((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu
BufferWrapper�s	(ubisectummapuosusysu	threadingu	itertoolsu_multiprocessingumultiprocessing.utiluFinalizeuinfoumultiprocessing.forkinguassert_spawningu__all__uplatformu_winapiuobjectuArenauHeapu
BufferWrapper(((u9/opt/alt/python33/lib64/python3.3/multiprocessing/heap.pyu<module>
s	�