uawdijnntqw1x1x1
IP : 18.117.232.108
Hostname : host45.registrar-servers.com
Kernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
jackpotjunglegam
/
..
/
..
/
lib64
/
python3.8
/
multiprocessing
/
__pycache__
/
.
/
heap.cpython-38.pyc
/
/
U e5dj-�@s�ddlZddlmZddlZddlZddlZddlZddlZddlm Z m Z ddlmZdgZ ejdkr�ddlZGdd �d e�Zn,Gd d �d e�Zdd�Zd d�Ze �ee�Gdd�de�ZGdd�de�ZdS)�N)�defaultdict�)� reduction�assert_spawning)�util� BufferWrapperZwin32c@s0eZdZdZe��Zdd�Zdd�Zdd�Z dS) �ArenazL A shared memory area backed by anonymous memory (Windows). cCsx||_td�D]B}dt��t|j�f}tjd||d�}t��dkrHqZ|� �qt d��||_||_|j|jf|_ dS)N�dz pym-%d-%s����ZtagnamerzCannot find name for new mmap)�size�range�os�getpid�next�_rand�mmap�_winapiZGetLastError�close�FileExistsError�name�buffer�_state)�selfr�irZbuf�r�,/usr/lib64/python3.8/multiprocessing/heap.py�__init__&s �Arena.__init__cCst|�|jS�N)rr)rrrr�__getstate__5szArena.__getstate__cCs,|\|_|_|_tjd|j|jd�|_dS)Nr r)rrrrr)r�staterrr�__setstate__9szArena.__setstate__N) �__name__� __module__�__qualname__�__doc__�tempfileZ_RandomNameSequencerrr r"rrrrrs rc@s8eZdZdZejdkrdgZngZd dd�Zdd�Zd S)rzJ A shared memory area backed by a temporary file (POSIX). Zlinuxz/dev/shmr cCsx||_||_|dkrbtjdt��|�|�d�\|_}t�|�t� |tj |jf�t�|j|�t�|j|j�|_ dS)Nr zpym-%d-)�prefix�dir)r�fdr'Zmkstemprr�_choose_dir�unlinkr�Finalizer� ftruncaterr)rrr*rrrrrMs � rcCs6|jD]&}t�|�}|j|j|kr|Sqt��Sr)�_dir_candidatesr�statvfs�f_bavail�f_frsizerZget_temp_dir)rr�d�strrrr+[s zArena._choose_dirN)r ) r#r$r%r&�sys�platformr/rr+rrrrrCs cCs(|jdkrtd��t|jt�|j�ffS)Nr zDArena is unpicklable because forking was enabled when it was created)r*� ValueError� rebuild_arenarrZDupFd)�arrr�reduce_arenads r:cCst||���Sr)r�detach)rZdupfdrrrr8jsr8c@szeZdZdZdZdZejfdd�Ze dd��Z dd�Zd d �Zdd�Z d d�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS)�Heap�i@cCsXt��|_t��|_||_g|_i|_i|_ i|_ tt�|_ g|_g|_d|_d|_dS�Nr)rr�_lastpid� threadingZLock�_lock�_size�_lengths�_len_to_seq�_start_to_block�_stop_to_blockr�set�_allocated_blocks�_arenas�_pending_free_blocks� _n_mallocs�_n_frees)rrrrrr{s z Heap.__init__cCs|d}|||@S)Nrr)�nZ alignment�maskrrr�_roundup�sz Heap._roundupcCsZ|�t|j|�tj�}|j|jkr0|jd9_t�d|�t|�}|j � |�|d|fS)N�z"allocating a new mmap of length %dr)rO�maxrBr�PAGESIZE�_DOUBLE_ARENA_SIZE_UNTILr�inforrI�append)rr�length�arenarrr� _new_arena�szHeap._new_arenacCs�|j}||jkrdS|j�|�}|r(t�|j|df=|j||f=|j�|�|j |}|�|d|f�|s~|j |=|j �|�dSr>)r�_DISCARD_FREE_SPACE_LARGER_THANrH�pop�AssertionErrorrErFrI�removerDrC)rrWrV�blocks�seqrrr�_discard_arena�s zHeap._discard_arenac Cs|t�|j|�}|t|j�kr&|�|�S|j|}|j|}|��}|sV|j|=|j|=|\}}}|j||f=|j||f=|Sr) �bisectZbisect_leftrC�lenrXrDrZrErF) rrrrVr^�blockrW�start�stoprrr�_malloc�s zHeap._mallocc Cs�|\}}}z|j||f}Wntk r0YnX|�|�\}}z|j||f}Wntk rfYnX|�|�\}}|||f}||}z|j|�|�Wn.tk r�|g|j|<t�|j|�YnX||j||f<||j||f<dSr) rF�KeyError�_absorbrErDrUr`ZinsortrC) rrbrWrcrdZ prev_block�_Z next_blockrVrrr�_add_free_block�s( zHeap._add_free_blockcCs^|\}}}|j||f=|j||f=||}|j|}|�|�|sV|j|=|j�|�||fSr)rErFrDr\rC)rrbrWrcrdrVr^rrrrg�s zHeap._absorbcCs4|\}}}|j|}|�||f�|s0|�|�dSr)rHr\r_)rrbrWrcrdr]rrr�_remove_allocated_block�s zHeap._remove_allocated_blockcCsBz|j��}Wntk r&Yq>YnX|�|�|�|�qdSr)rJrZ� IndexErrorrirj�rrbrrr�_free_pending_blockss zHeap._free_pending_blockscCs~t��|jkr$td�t��|j���|j�d�s>|j�|�n<z.|j d7_ |��|�|�|� |�W5|j� �XdS)Nz$My pid ({0:n}) is not last pid {1:n}Fr)rrr?r7�formatrA�acquirerJrU�releaserLrmrirjrlrrr�frees �� z Heap.freec Cs�|dkrtd�|���tj|kr.td�|���t��|jkrD|��|j ��|j d7_ |��|�t |d�|j�}|�|�\}}}||}||kr�|�|||f�|j|�||f�|||fW5QR�SQRXdS)Nr�Size {0:n} out of range�Size {0:n} too larger)r7rnr5�maxsize� OverflowErrorrrr?rrArKrmrOrQ� _alignmentrerirH�add)rrrWrcrdZ real_stoprrr�malloc(s zHeap.mallocN)r#r$r%rvrYrSrrRr�staticmethodrOrXr_rerirgrjrmrqrxrrrrr<ss r<c@s"eZdZe�Zdd�Zdd�ZdS)rcCs^|dkrtd�|���tj|kr.td�|���tj�|�}||f|_t j |tjj|fd�dS)Nrrrrs)�args)r7rnr5rtrur�_heaprxrrr-rq)rrrbrrrrFs zBufferWrapper.__init__cCs&|j\\}}}}t|j�|||�Sr)r� memoryviewr)rrWrcrdrrrr�create_memoryviewOszBufferWrapper.create_memoryviewN)r#r$r%r<r{rr}rrrrrBs )r`�collectionsrrrr5r'r@�contextrr�r�__all__r6r�objectrr:r8�registerr<rrrrr�<module> s& $!P
/home/jackpotjunglegam/../../lib64/python3.8/multiprocessing/__pycache__/./heap.cpython-38.pyc