Lines Matching refs:ZSMMG
127 ZSMMG(shared_segments) = NULL; in zend_shared_alloc_try()
128 ZSMMG(shared_segments_count) = 0; in zend_shared_alloc_try()
166 ZSMMG(shared_free) = requested_size; /* goes to tmp_shared_globals.shared_free */ in zend_shared_alloc_startup()
179 …res = zend_shared_alloc_try(he, requested_size, &ZSMMG(shared_segments), &ZSMMG(shared_segments_co… in zend_shared_alloc_startup()
196 …res = zend_shared_alloc_try(he, requested_size, &ZSMMG(shared_segments), &ZSMMG(shared_segments_co… in zend_shared_alloc_startup()
213 shared_segments_array_size = ZSMMG(shared_segments_count) * S_H(segment_type_size)(); in zend_shared_alloc_startup()
223 …tmp_shared_segments = zend_shared_alloc(shared_segments_array_size + ZSMMG(shared_segments_count) … in zend_shared_alloc_startup()
229 …copy_shared_segments(tmp_shared_segments, ZSMMG(shared_segments)[0], ZSMMG(shared_segments_count),… in zend_shared_alloc_startup()
234 free(ZSMMG(shared_segments)); in zend_shared_alloc_startup()
235 ZSMMG(shared_segments) = tmp_shared_segments; in zend_shared_alloc_startup()
237 …ZSMMG(shared_memory_state).positions = (int *)zend_shared_alloc(sizeof(int) * ZSMMG(shared_segment… in zend_shared_alloc_startup()
238 if (!ZSMMG(shared_memory_state).positions) { in zend_shared_alloc_startup()
257 …shared_segments_array_size = ZSMMG(shared_segments_count) * (S_H(segment_type_size)() + sizeof(voi… in zend_shared_alloc_shutdown()
259 …copy_shared_segments(tmp_shared_segments, ZSMMG(shared_segments)[0], ZSMMG(shared_segments_count),… in zend_shared_alloc_shutdown()
260 ZSMMG(shared_segments) = tmp_shared_segments; in zend_shared_alloc_shutdown()
262 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_shared_alloc_shutdown()
263 S_H(detach_segment)(ZSMMG(shared_segments)[i]); in zend_shared_alloc_shutdown()
265 efree(ZSMMG(shared_segments)); in zend_shared_alloc_shutdown()
266 ZSMMG(shared_segments) = NULL; in zend_shared_alloc_shutdown()
278 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_shared_alloc_get_largest_free_block()
279 size_t block_size = ZSMMG(shared_segments)[i]->size - ZSMMG(shared_segments)[i]->pos; in zend_shared_alloc_get_largest_free_block()
291 …free shared space to allocate %ld bytes (%ld bytes free)", (long)size, (long)ZSMMG(shared_free)); \
293 ZSMMG(memory_exhausted) = 1; \
308 if (block_size > ZSMMG(shared_free)) { /* No hope to find a big-enough block */ in zend_shared_alloc()
312 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_shared_alloc()
313 …if (ZSMMG(shared_segments)[i]->size - ZSMMG(shared_segments)[i]->pos >= block_size) { /* found a v… in zend_shared_alloc()
314 …void *retval = (void *) (((char *) ZSMMG(shared_segments)[i]->p) + ZSMMG(shared_segments)[i]->pos); in zend_shared_alloc()
316 ZSMMG(shared_segments)[i]->pos += block_size; in zend_shared_alloc()
317 ZSMMG(shared_free) -= block_size; in zend_shared_alloc()
449 return ZSMMG(shared_free); in zend_shared_alloc_get_free_memory()
456 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_shared_alloc_save_state()
457 ZSMMG(shared_memory_state).positions[i] = ZSMMG(shared_segments)[i]->pos; in zend_shared_alloc_save_state()
459 ZSMMG(shared_memory_state).shared_free = ZSMMG(shared_free); in zend_shared_alloc_save_state()
466 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_shared_alloc_restore_state()
467 ZSMMG(shared_segments)[i]->pos = ZSMMG(shared_memory_state).positions[i]; in zend_shared_alloc_restore_state()
469 ZSMMG(shared_free) = ZSMMG(shared_memory_state).shared_free; in zend_shared_alloc_restore_state()
470 ZSMMG(memory_exhausted) = 0; in zend_shared_alloc_restore_state()
471 ZSMMG(wasted_shared_memory) = 0; in zend_shared_alloc_restore_state()
490 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_accel_shared_protect()
491 mprotect(ZSMMG(shared_segments)[i]->p, ZSMMG(shared_segments)[i]->size, mode); in zend_accel_shared_protect()