DECLARE_CACHE_VARS
ALS_FETCH();
-#ifdef ZTS
+#if defined(ZTS) && ZEND_DEBUG
if (p->thread_id != tsrm_thread_id()) {
-# if ZEND_DEBUG
tsrm_error(TSRM_ERROR_LEVEL_ERROR, "Memory block allocated at %s:(%d) on thread %x freed at %s:(%d) on thread %x, ignoring",
p->filename, p->lineno, p->thread_id,
__zend_filename, __zend_lineno, tsrm_thread_id());
-# endif
return;
}
#endif
return _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
-#ifdef ZTS
+#if defined(ZTS) && ZEND_DEBUG
if (p->thread_id != tsrm_thread_id()) {
void *new_p;
-# if ZEND_DEBUG
tsrm_error(TSRM_ERROR_LEVEL_ERROR, "Memory block allocated at %s:(%d) on thread %x reallocated at %s:(%d) on thread %x, duplicating",
p->filename, p->lineno, p->thread_id,
__zend_filename, __zend_lineno, tsrm_thread_id());
-# endif
new_p = _emalloc(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
memcpy(new_p, ptr, p->size);
return new_p;