Lines Matching refs:ZSMMG
125 ZSMMG(shared_segments) = NULL; in zend_shared_alloc_try()
126 ZSMMG(shared_segments_count) = 0; in zend_shared_alloc_try()
163 ZSMMG(shared_free) = requested_size; /* goes to tmp_shared_globals.shared_free */ in zend_shared_alloc_startup()
180 …res = zend_shared_alloc_try(he, requested_size, &ZSMMG(shared_segments), &ZSMMG(shared_segments_co… in zend_shared_alloc_startup()
202 …res = zend_shared_alloc_try(he, requested_size, &ZSMMG(shared_segments), &ZSMMG(shared_segments_co… in zend_shared_alloc_startup()
224 shared_segments_array_size = ZSMMG(shared_segments_count) * S_H(segment_type_size)(); in zend_shared_alloc_startup()
234 …tmp_shared_segments = zend_shared_alloc(shared_segments_array_size + ZSMMG(shared_segments_count) … in zend_shared_alloc_startup()
240 …copy_shared_segments(tmp_shared_segments, ZSMMG(shared_segments)[0], ZSMMG(shared_segments_count),… in zend_shared_alloc_startup()
245 free(ZSMMG(shared_segments)); in zend_shared_alloc_startup()
246 ZSMMG(shared_segments) = tmp_shared_segments; in zend_shared_alloc_startup()
248 …ZSMMG(shared_memory_state).positions = (int *)zend_shared_alloc(sizeof(int) * ZSMMG(shared_segment… in zend_shared_alloc_startup()
249 if (!ZSMMG(shared_memory_state).positions) { in zend_shared_alloc_startup()
268 …shared_segments_array_size = ZSMMG(shared_segments_count) * (S_H(segment_type_size)() + sizeof(voi… in zend_shared_alloc_shutdown()
270 …copy_shared_segments(tmp_shared_segments, ZSMMG(shared_segments)[0], ZSMMG(shared_segments_count),… in zend_shared_alloc_shutdown()
271 ZSMMG(shared_segments) = tmp_shared_segments; in zend_shared_alloc_shutdown()
273 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_shared_alloc_shutdown()
274 S_H(detach_segment)(ZSMMG(shared_segments)[i]); in zend_shared_alloc_shutdown()
276 efree(ZSMMG(shared_segments)); in zend_shared_alloc_shutdown()
277 ZSMMG(shared_segments) = NULL; in zend_shared_alloc_shutdown()
289 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_shared_alloc_get_largest_free_block()
290 size_t block_size = ZSMMG(shared_segments)[i]->size - ZSMMG(shared_segments)[i]->pos; in zend_shared_alloc_get_largest_free_block()
302 …D_LONG_FMT" bytes ("ZEND_LONG_FMT" bytes free)", (zend_long)size, (zend_long)ZSMMG(shared_free)); \
304 ZSMMG(memory_exhausted) = 1; \
318 if (block_size > ZSMMG(shared_free)) { /* No hope to find a big-enough block */ in zend_shared_alloc()
322 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_shared_alloc()
323 …if (ZSMMG(shared_segments)[i]->size - ZSMMG(shared_segments)[i]->pos >= block_size) { /* found a v… in zend_shared_alloc()
324 …void *retval = (void *) (((char *) ZSMMG(shared_segments)[i]->p) + ZSMMG(shared_segments)[i]->pos); in zend_shared_alloc()
326 ZSMMG(shared_segments)[i]->pos += block_size; in zend_shared_alloc()
327 ZSMMG(shared_free) -= block_size; in zend_shared_alloc()
467 return ZSMMG(shared_free); in zend_shared_alloc_get_free_memory()
474 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_shared_alloc_save_state()
475 ZSMMG(shared_memory_state).positions[i] = ZSMMG(shared_segments)[i]->pos; in zend_shared_alloc_save_state()
477 ZSMMG(shared_memory_state).shared_free = ZSMMG(shared_free); in zend_shared_alloc_save_state()
484 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_shared_alloc_restore_state()
485 ZSMMG(shared_segments)[i]->pos = ZSMMG(shared_memory_state).positions[i]; in zend_shared_alloc_restore_state()
487 ZSMMG(shared_free) = ZSMMG(shared_memory_state).shared_free; in zend_shared_alloc_restore_state()
488 ZSMMG(memory_exhausted) = 0; in zend_shared_alloc_restore_state()
489 ZSMMG(wasted_shared_memory) = 0; in zend_shared_alloc_restore_state()
512 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_accel_shared_protect()
513 mprotect(ZSMMG(shared_segments)[i]->p, ZSMMG(shared_segments)[i]->size, mode); in zend_accel_shared_protect()
526 for (i = 0; i < ZSMMG(shared_segments_count); i++) { in zend_accel_in_shm()
527 if ((char*)ptr >= (char*)ZSMMG(shared_segments)[i]->p && in zend_accel_in_shm()
528 (char*)ptr < (char*)ZSMMG(shared_segments)[i]->p + ZSMMG(shared_segments)[i]->size) { in zend_accel_in_shm()