emalloc()php uses its own memory allocator (which is optimized for php workload and ensures maximum memory usage).
emalloc(), , PHP .
RETURN_STRINGL() , .
PHP , .
PHP . , efree(), /, emalloc().
, emalloc() 0 RETURN_STRINGL():
RETURN_STRINGL(proc_data, length, 0);
, , :
// RETVAL_STRINGL lets you set the return value, and then do anything before
// actually leaving the function
RETVAL_STRINGL(proc_data, length, 1);
free(proc_data);
return;
source
share