|
|
| version 1.1.1.1, 2012/02/21 23:47:52 | version 1.1.1.3, 2013/07/22 01:32:15 |
|---|---|
| Line 2 | Line 2 |
| +----------------------------------------------------------------------+ | +----------------------------------------------------------------------+ |
| | Zend Engine | | | Zend Engine | |
| +----------------------------------------------------------------------+ | +----------------------------------------------------------------------+ |
| | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) | | | Copyright (c) 1998-2013 Zend Technologies Ltd. (http://www.zend.com) | |
| +----------------------------------------------------------------------+ | +----------------------------------------------------------------------+ |
| | This source file is subject to version 2.00 of the Zend license, | | | This source file is subject to version 2.00 of the Zend license, | |
| | that is bundled with this package in the file LICENSE, and is | | | that is bundled with this package in the file LICENSE, and is | |
| Line 44 | Line 44 |
| typedef struct _zend_leak_info { | typedef struct _zend_leak_info { |
| void *addr; | void *addr; |
| size_t size; | size_t size; |
| char *filename; | const char *filename; |
| uint lineno; | uint lineno; |
| char *orig_filename; | const char *orig_filename; |
| uint orig_lineno; | uint orig_lineno; |
| } zend_leak_info; | } zend_leak_info; |
| Line 161 ZEND_API size_t zend_memory_peak_usage(int real_usage | Line 161 ZEND_API size_t zend_memory_peak_usage(int real_usage |
| END_EXTERN_C() | END_EXTERN_C() |
| /* Macroses for zend_fast_cache.h compatibility */ | |
| #define ZEND_FAST_ALLOC(p, type, fc_type) \ | |
| (p) = (type *) emalloc(sizeof(type)) | |
| #define ZEND_FAST_FREE(p, fc_type) \ | |
| efree(p) | |
| #define ZEND_FAST_ALLOC_REL(p, type, fc_type) \ | |
| (p) = (type *) emalloc_rel(sizeof(type)) | |
| #define ZEND_FAST_FREE_REL(p, fc_type) \ | |
| efree_rel(p) | |
| /* fast cache for zval's */ | /* fast cache for zval's */ |
| #define ALLOC_ZVAL(z) \ | #define ALLOC_ZVAL(z) \ |
| ZEND_FAST_ALLOC(z, zval, ZVAL_CACHE_LIST) | (z) = (zval *) emalloc(sizeof(zval)) |
| #define FREE_ZVAL(z) \ | #define FREE_ZVAL(z) \ |
| ZEND_FAST_FREE(z, ZVAL_CACHE_LIST) | efree_rel(z) |
| #define ALLOC_ZVAL_REL(z) \ | #define ALLOC_ZVAL_REL(z) \ |
| ZEND_FAST_ALLOC_REL(z, zval, ZVAL_CACHE_LIST) | (z) = (zval *) emalloc_rel(sizeof(zval)) |
| #define FREE_ZVAL_REL(z) \ | #define FREE_ZVAL_REL(z) \ |
| ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST) | efree_rel(z) |
| /* fast cache for HashTables */ | /* fast cache for HashTables */ |
| #define ALLOC_HASHTABLE(ht) \ | #define ALLOC_HASHTABLE(ht) \ |
| ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST) | (ht) = (HashTable *) emalloc(sizeof(HashTable)) |
| #define FREE_HASHTABLE(ht) \ | #define FREE_HASHTABLE(ht) \ |
| ZEND_FAST_FREE(ht, HASHTABLE_CACHE_LIST) | efree(ht) |
| #define ALLOC_HASHTABLE_REL(ht) \ | #define ALLOC_HASHTABLE_REL(ht) \ |
| ZEND_FAST_ALLOC_REL(ht, HashTable, HASHTABLE_CACHE_LIST) | (ht) = (HashTable *) emalloc_rel(sizeof(HashTable)) |
| #define FREE_HASHTABLE_REL(ht) \ | #define FREE_HASHTABLE_REL(ht) \ |
| ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST) | efree_rel(ht) |
| /* Heap functions */ | /* Heap functions */ |
| typedef struct _zend_mm_heap zend_mm_heap; | typedef struct _zend_mm_heap zend_mm_heap; |
| typedef struct _zend_mm_heap_canary zend_mm_heap_canary; | |
| ZEND_API zend_mm_heap *zend_mm_startup(void); | ZEND_API zend_mm_heap *zend_mm_startup(void); |
| ZEND_API void zend_mm_shutdown(zend_mm_heap *heap, int full_shutdown, int silent TSRMLS_DC); | ZEND_API void zend_mm_shutdown(zend_mm_heap *heap, int full_shutdown, int silent TSRMLS_DC); |