Example #1
0
def p_instance_alloc_pool_share(p):
    '''instance_alloc : POOL SHARE ID '''
    # Shared pool allocation. Allocate storage for one pool, 
    # size is computed to store N of those items.
    # The free-list is constructed using the largest
    # type. So... sizeof(largest) * N explicitly size
    # pool is the total storage required, plus overhead.
    # Essentially, all are competing for a shared free list. 
    p[0] = st.ND_alloc_pool(st.LN(p.lineno(1)), st.makename('_P', None, p[3]))
Example #2
0
def p_instance_alloc_pool(p):
    '''instance_alloc : POOL exp '''
    # Allocation for a list pool.
    p[0] = st.ND_alloc_pool(st.LN(p.lineno(1)), st.makename('_P'), p[2])