File: //lib64/python3.9/multiprocessing/__pycache__/heap.cpython-39.opt-2.pyc
a
    �DOgj-  �                   @   s�   d dl Z d dlmZ d dlZd dlZd dlZd dlZd dlZddlm	Z	m
Z
 ddlmZ dgZ
ejdkr�d dlZG dd	� d	e�Zn,G d
d	� d	e�Zdd� Zd
d� Ze	�ee� G dd� de�ZG dd� de�ZdS )�    N)�defaultdict�   )�	reduction�assert_spawning)�util�
BufferWrapper�win32c                   @   s,   e Zd Ze�� Zdd� Zdd� Zdd� ZdS )�Arenac                 C   sx   || _ td�D ]B}dt�� t| j�f }tjd||d�}t�� dkrH qZ|�	�  qt
d��|| _|| _| j | jf| _
d S )N�d   z	pym-%d-%s����Ztagnamer   zCannot find name for new mmap)�size�range�os�getpid�next�_rand�mmap�_winapiZGetLastError�close�FileExistsError�name�buffer�_state)�selfr
   �ir   �buf� r   �,/usr/lib64/python3.9/multiprocessing/heap.py�__init__&