Lines Matching refs:zend_mm_free_block
404 } zend_mm_free_block; typedef
437 zend_mm_free_block *cache[ZEND_MM_NUM_BUCKETS];
439 zend_mm_free_block *free_buckets[ZEND_MM_NUM_BUCKETS*2];
440 zend_mm_free_block *large_free_buckets[ZEND_MM_NUM_BUCKETS];
441 zend_mm_free_block *rest_buckets[2];
453 (zend_mm_free_block*) ((char*)&heap->free_buckets[index * 2] + \
454 sizeof(zend_mm_free_block*) * 2 - \
458 (zend_mm_free_block*)((char*)&heap->rest_buckets[0] + \
459 sizeof(zend_mm_free_block*) * 2 - \
718 static inline void zend_mm_add_to_rest_list(zend_mm_heap *heap, zend_mm_free_block *mm_block) in zend_mm_add_to_rest_list()
720 zend_mm_free_block *prev, *next; in zend_mm_add_to_rest_list()
735 static inline void zend_mm_add_to_free_list(zend_mm_heap *heap, zend_mm_free_block *mm_block) in zend_mm_add_to_free_list()
744 zend_mm_free_block **p; in zend_mm_add_to_free_list()
758 zend_mm_free_block *prev = *p; in zend_mm_add_to_free_list()
769 zend_mm_free_block *next = prev->next_free_block; in zend_mm_add_to_free_list()
780 zend_mm_free_block *prev, *next; in zend_mm_add_to_free_list()
796 static inline void zend_mm_remove_from_free_list(zend_mm_heap *heap, zend_mm_free_block *mm_block) in zend_mm_remove_from_free_list()
798 zend_mm_free_block *prev = mm_block->prev_free_block; in zend_mm_remove_from_free_list()
799 zend_mm_free_block *next = mm_block->next_free_block; in zend_mm_remove_from_free_list()
804 zend_mm_free_block **rp, **cp; in zend_mm_remove_from_free_list()
869 zend_mm_free_block* p; in zend_mm_init()
887 p = (zend_mm_free_block*)((char*)p + sizeof(zend_mm_free_block*) * 2); in zend_mm_init()
912 zend_mm_free_block *mm_block = heap->cache[i]; in zend_mm_free_cache()
916 zend_mm_free_block *q = mm_block->prev_free_block; in zend_mm_free_cache()
922 mm_block = (zend_mm_free_block*)ZEND_MM_PREV_BLOCK(mm_block); in zend_mm_free_cache()
924 zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) mm_block); in zend_mm_free_cache()
928 zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block); in zend_mm_free_cache()
936 zend_mm_add_to_free_list(heap, (zend_mm_free_block *) mm_block); in zend_mm_free_cache()
1104 zend_mm_free_block *p, *q, *orig; in zend_mm_startup_ex()
1122 p = (zend_mm_free_block*)((char*)p + sizeof(zend_mm_free_block*) * 2); in zend_mm_startup_ex()
1123 orig = (zend_mm_free_block*)((char*)orig + sizeof(zend_mm_free_block*) * 2); in zend_mm_startup_ex()
1737 static zend_mm_free_block *zend_mm_search_large_block(zend_mm_heap *heap, size_t true_size) in zend_mm_search_large_block()
1739 zend_mm_free_block *best_fit; in zend_mm_search_large_block()
1742 zend_mm_free_block *p; in zend_mm_search_large_block()
1750 zend_mm_free_block *rst = NULL; in zend_mm_search_large_block()
1812 zend_mm_free_block *best_fit; in _zend_mm_alloc_int()
1865 zend_mm_free_block *p = heap->rest_buckets[0]; in _zend_mm_alloc_int()
1934 best_fit = (zend_mm_free_block *) ((char *) segment + ZEND_MM_ALIGNED_SEGMENT_SIZE); in _zend_mm_alloc_int()
1959 zend_mm_free_block *new_free_block; in _zend_mm_alloc_int()
1963 new_free_block = (zend_mm_free_block *) ZEND_MM_BLOCK_AT(best_fit, true_size); in _zend_mm_alloc_int()
2008 zend_mm_free_block **cache = &heap->cache[index]; in _zend_mm_free_int()
2010 ((zend_mm_free_block*)mm_block)->prev_free_block = *cache; in _zend_mm_free_int()
2011 *cache = (zend_mm_free_block*)mm_block; in _zend_mm_free_int()
2029 zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block); in _zend_mm_free_int()
2034 zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) mm_block); in _zend_mm_free_int()
2042 zend_mm_add_to_free_list(heap, (zend_mm_free_block *) mm_block); in _zend_mm_free_int()
2071 zend_mm_free_block *new_free_block; in _zend_mm_realloc_int()
2077 zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block); in _zend_mm_realloc_int()
2082 new_free_block = (zend_mm_free_block *) ZEND_MM_BLOCK_AT(mm_block, true_size); in _zend_mm_realloc_int()
2100 zend_mm_free_block *best_fit; in _zend_mm_realloc_int()
2101 zend_mm_free_block **cache; in _zend_mm_realloc_int()
2125 ((zend_mm_free_block*)mm_block)->prev_free_block = *cache; in _zend_mm_realloc_int()
2126 *cache = (zend_mm_free_block*)mm_block; in _zend_mm_realloc_int()
2149 zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block); in _zend_mm_realloc_int()
2155 zend_mm_free_block *new_free_block; in _zend_mm_realloc_int()
2159 new_free_block = (zend_mm_free_block *) ZEND_MM_BLOCK_AT(mm_block, true_size); in _zend_mm_realloc_int()
2180 zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block); in _zend_mm_realloc_int()
2204 zend_mm_add_to_free_list(heap, (zend_mm_free_block *) next_block); in _zend_mm_realloc_int()
2259 zend_mm_free_block *new_free_block; in _zend_mm_realloc_int()
2263 new_free_block = (zend_mm_free_block *) ZEND_MM_BLOCK_AT(mm_block, true_size); in _zend_mm_realloc_int()