Files
TransPyC/Test/ReTest/temp/68c4fe4b12c908e3.pyi
2026-07-18 19:25:40 +08:00

51 lines
1.8 KiB
Python

"""
Auto-generated Python stub file from mpool.py
Module: mpool
"""
import t, c
from stdint import *
import viperio
import string
MPOOL_ALIGN: t.CDefine = 8
MPOOL_TYPE_SLAB: t.CDefine = 0
MPOOL_TYPE_BUMP: t.CDefine = 2
def _align_up(val: t.CSizeT, align: t.CSizeT) -> t.CSizeT: pass
class MPool:
mtype: t.CInt
mem: t.CVoid | t.CPtr
mem_size: t.CSizeT
offset: t.CSizeT
high_water: t.CSizeT
block_size: t.CSizeT
block_count: t.CSizeT
used_count: t.CSizeT
free_list: t.CVoid | t.CPtr
alloc_map: t.CUInt8T | t.CPtr
alloc_map_size: t.CSizeT
def __init__(self: MPool, mem: t.CVoid | t.CPtr, mem_size: t.CSizeT, block_size: t.CSizeT) -> t.CInt: pass
def _init_bump(self: MPool, mem: t.CVoid | t.CPtr, mem_size: t.CSizeT) -> t.CInt: pass
def _init_slab(self: MPool, mem: t.CVoid | t.CPtr, mem_size: t.CSizeT, block_size: t.CSizeT) -> t.CInt: pass
def __enter__(self: MPool) -> 'MPool' | t.CPtr: pass
def __exit__(self: MPool) -> t.CInt: pass
def _slab_reset(self: MPool) -> t.CInt: pass
def alloc(self: MPool, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
def alloc_buf(self: MPool, capacity: t.CSizeT) -> viperio.Buf | t.CPtr: pass
def free(self: MPool, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
def realloc(self: MPool, ptr: t.CVoid | t.CPtr, old_size: t.CSizeT, new_size: t.CSizeT) -> t.CVoid | t.CPtr: pass
def reset(self: MPool) -> t.CInt: pass
def _bump_alloc(self: MPool, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
def _slab_alloc(self: MPool) -> t.CVoid | t.CPtr: pass
def _slab_free(self: MPool, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
def bump_create(mem: t.CVoid | t.CPtr, mem_size: t.CSizeT) -> MPool | t.CPtr: pass
def alloc(pool: MPool | t.CPtr, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
def reset(pool: MPool | t.CPtr) -> t.CInt: pass