Browse Source

Allow runtime setting of the memory limit

migration/INITIAL
Zeev Suraski 28 years ago
parent
commit
4472d05025
  1. 2
      Zend/zend_alloc.c
  2. 2
      Zend/zend_alloc.h

2
Zend/zend_alloc.c

@ -304,7 +304,7 @@ ZEND_API char *zend_strndup(const char *s, uint length)
}
ZEND_API int set_memory_limit(unsigned int memory_limit)
ZEND_API int zend_set_memory_limit(unsigned int memory_limit)
{
#if MEMORY_LIMIT
ALS_FETCH();

2
Zend/zend_alloc.h

@ -92,7 +92,7 @@ ZEND_API void _persist_alloc(void *ptr);
#define safe_estrdup(ptr) ((ptr)?(estrdup(ptr)):(empty_string))
#define safe_estrndup(ptr,len) ((ptr)?(estrndup((ptr),(len))):(empty_string))
ZEND_API int set_memory_limit(unsigned int memory_limit);
ZEND_API int zend_set_memory_limit(unsigned int memory_limit);
ZEND_API void start_memory_manager(void);
ZEND_API void shutdown_memory_manager(int silent, int clean_cache);

Loading…
Cancel
Save