Searched refs:size (Results 1 - 25 of 260) sorted by relevance

1234567891011

/PHP_TRUNK/sapi/fpm/fpm/
H A Dfpm_shm.c20 void *fpm_shm_alloc(size_t size) /* {{{ */ argument
24 mem = mmap(0, size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, -1, 0);
28 zlog(ZLOG_SYSERROR, "unable to allocate %zu bytes in shared memory: %s", size, strerror(errno));
34 zlog(ZLOG_SYSERROR, "unable to allocate %zu bytes in shared memory", size);
38 memset(mem, 0, size);
39 fpm_shm_size += size;
44 int fpm_shm_free(void *mem, size_t size) /* {{{ */ argument
51 if (munmap(mem, size) == -1) {
56 if (fpm_shm_size - size > 0) {
57 fpm_shm_size -= size;
[all...]
H A Dfpm_shm.h8 void *fpm_shm_alloc(size_t size);
9 int fpm_shm_free(void *mem, size_t size);
H A Dfpm_str.h8 static inline char *str_purify_filename(char *dst, char *src, size_t size) /* {{{ */ argument
13 end = dst + size - 1;
/PHP_TRUNK/ext/mbstring/oniguruma/
H A Dreggnu.c44 re_adjust_startpos(regex_t* reg, const char* string, int size, argument
47 if (startpos > 0 && ONIGENC_MBC_MAXLEN(reg->enc) != 1 && startpos < size) {
64 re_match(regex_t* reg, const char* str, int size, int pos, argument
67 return onig_match(reg, (UChar* )str, (UChar* )(str + size),
72 re_search(regex_t* bufp, const char* string, int size, int startpos, int range, argument
75 return onig_search(bufp, (UChar* )string, (UChar* )(string + size),
82 re_compile_pattern(const char* pattern, int size, regex_t* reg, char* ebuf) argument
87 r = onig_compile(reg, (UChar* )pattern, (UChar* )(pattern + size), &einfo);
98 re_recompile_pattern(const char* pattern, int size, regex_t* reg, char* ebuf) argument
109 r = onig_recompile(reg, (UChar* )pattern, (UChar* )(pattern + size),
[all...]
H A Dregposerr.c73 size_t size)
93 if (buf != NULL && size > 0) {
94 strncpy(buf, s, size - 1);
95 buf[size - 1] = '\0';
72 regerror(int posix_ecode, const regex_t* reg ARG_UNUSED, char* buf, size_t size) argument
/PHP_TRUNK/TSRM/
H A Dtsrm_config_common.h58 # define tsrm_do_alloca_ex(size, limit, use_heap) \
59 ((use_heap = ((size) > (limit))) ? malloc(size) : alloca(size))
60 # define tsrm_do_alloca(size, use_heap) \
61 tsrm_do_alloca_ex(size, TSRM_ALLOCA_MAX_SIZE, use_heap)
/PHP_TRUNK/main/
H A Dmergesort.c69 static void setup(u_char *list1, u_char *list2, size_t n, size_t size, int (*cmp)(const void *, const void *));
70 static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const void *, const void *));
105 PHPAPI int php_mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void *)) argument
113 if (size < PSIZE / 2) { /* Pointers must fit into 2 * size. */
126 if (!(size % ISIZE) && !(((char *)base - (char *)0) % ISIZE))
129 if ((list2 = malloc(nmemb * size + PSIZE)) == NULL)
133 setup(list1, list2, nmemb, size, cmp);
134 last = list2 + nmemb * size;
157 while ((b += size) <
265 setup(u_char *list1, u_char *list2, size_t n, size_t size, int (*cmp)(const void *, const void *)) argument
336 insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const void *, const void *)) argument
[all...]
/PHP_TRUNK/ext/standard/
H A Dcrypt_blowfish.h22 extern int _crypt_output_magic(const char *setting, char *output, int size);
25 char *output, int size);
29 const char *input, int size, char *output, int output_size);
H A Drandom.c77 static int php_random_bytes(void *bytes, size_t size) argument
81 if (php_win32_get_random_bytes(bytes, size) == FAILURE) {
86 arc4random_buf(bytes, size);
105 while (read_bytes < size) {
106 ssize_t n = read(fd, bytes + read_bytes, size - read_bytes);
113 if (read_bytes < size) {
127 zend_long size; local
130 if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &size) == FAILURE) {
134 if (size < 1) {
139 bytes = zend_string_alloc(size,
[all...]
H A Dpack.c93 static void php_pack(zval *val, size_t size, int *map, char *output) argument
101 for (i = 0; i < size; i++) {
529 static zend_long php_unpack(char *data, size_t size, int issigned, int *map) argument
537 for (i = 0; i < size; i++) {
585 int size=0; local
622 size = -1;
626 size = 0;
632 size = arg;
638 size = (arg > 0) ? (arg + (arg % 2)) / 2 : arg;
646 size
1080 int size = sizeof(Z_LVAL(val)); local
[all...]
/PHP_TRUNK/ext/gd/libgd/
H A Dgdhelpers.h15 #define gdCalloc(nmemb, size) ecalloc(nmemb, size)
16 #define gdMalloc(size) emalloc(size)
17 #define gdRealloc(ptr, size) erealloc(ptr, size)
/PHP_TRUNK/Zend/
H A Dzend_arena.h34 static zend_always_inline zend_arena* zend_arena_create(size_t size) argument
36 zend_arena *arena = (zend_arena*)emalloc(size);
39 arena->end = (char*) arena + size;
55 static zend_always_inline void* zend_arena_alloc(zend_arena **arena_ptr, size_t size) argument
60 size = ZEND_MM_ALIGNED_SIZE(size);
62 if (EXPECTED(size <= (size_t)(arena->end - ptr))) {
63 arena->ptr = ptr + size;
66 UNEXPECTED((size + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena))) > (size_t)(arena->end - (char*) arena)) ?
67 (size
84 size_t size; local
[all...]
H A Dzend_alloc.h42 #define ZEND_MM_ALIGNED_SIZE(size) (((size) + ZEND_MM_ALIGNMENT - Z_L(1)) & ZEND_MM_ALIGNMENT_MASK)
46 size_t size; member in struct:_zend_leak_info
55 size_t size; member in struct:_zend_mm_debug_info
71 ZEND_API void* ZEND_FASTCALL _emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE(1);
72 ZEND_API void* ZEND_FASTCALL _safe_emalloc(size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
73 ZEND_API void* ZEND_FASTCALL _safe_malloc(size_t nmemb, size_t size, size_t offset) ZEND_ATTRIBUTE_MALLOC;
75 ZEND_API void* ZEND_FASTCALL _ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC ZEND_ATTRIBUTE_ALLOC_SIZE2(1,2);
76 ZEND_API void* ZEND_FASTCALL _erealloc(void *ptr, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_ALLOC_SIZE(2);
77 ZEND_API void* ZEND_FASTCALL _erealloc2(void *ptr, size_t size, size_
[all...]
H A Dzend_alloc.c29 * Huge - the size is greater than CHUNK size (~2M by default), allocation is
35 * Small - less than 3/4 of page size. Small sizes are rounded up to nearest
36 * greater predefined small size (there are 30 predefined sizes:
53 * with more specialized routines when the requested size is known.
148 #define ZEND_MM_ALIGNED_OFFSET(size, alignment) \
149 (((size_t)(size)) & ((alignment) - 1))
150 #define ZEND_MM_ALIGNED_BASE(size, alignment) \
151 (((size_t)(size)) & ~((alignment) - 1))
152 #define ZEND_MM_ALIGNED_SIZE_EX(size, alignmen
235 size_t size; /* current memory usage */ member in struct:_zend_mm_heap
296 size_t size; member in struct:_zend_mm_huge_list
352 zend_mm_safe_error(zend_mm_heap *heap, const char *format, size_t limit, const char *filename, uint lineno, size_t size) argument
407 zend_mm_mmap_fixed(void *addr, size_t size) argument
432 zend_mm_mmap(size_t size) argument
457 zend_mm_munmap(void *addr, size_t size) argument
560 zend_mm_bitset_find_zero(zend_mm_bitset *bitset, int size) argument
574 zend_mm_bitset_find_one(zend_mm_bitset *bitset, int size) argument
588 zend_mm_bitset_find_zero_and_set(zend_mm_bitset *bitset, int size) argument
723 zend_mm_chunk_alloc_int(size_t size, size_t alignment) argument
769 zend_mm_chunk_alloc(zend_mm_heap *heap, size_t size, size_t alignment) argument
781 zend_mm_chunk_free(zend_mm_heap *heap, void *addr, size_t size) argument
1020 size_t size = heap->real_size + ZEND_MM_CHUNK_SIZE; local
1064 size_t size = heap->size + pages_count * ZEND_MM_PAGE_SIZE; local
1121 zend_mm_small_size_to_bit(int size) argument
1152 zend_mm_small_size_to_bin(size_t size) argument
1235 zend_mm_alloc_small(zend_mm_heap *heap, size_t size, int bin_num ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) argument
1239 size_t size = heap->size + bin_data_size[bin_num]; local
1397 zend_mm_realloc_heap(zend_mm_heap *heap, void *ptr, size_t size, size_t copy_size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) argument
1548 size_t size = heap->size + (new_size - old_size); local
1587 zend_mm_add_huge_block(zend_mm_heap *heap, void *ptr, size_t size, size_t dbg_size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) argument
1612 size_t size; local
1644 zend_mm_change_huge_block_size(zend_mm_heap *heap, void *ptr, size_t size, size_t dbg_size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) argument
1702 size_t size = heap->real_size + new_size; local
1708 size_t size = heap->size + new_size; local
1721 size_t size; local
2075 _zend_mm_realloc2(zend_mm_heap *heap, void *ptr, size_t size, size_t copy_size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) argument
2145 _emalloc_huge(size_t size) argument
2197 _efree_huge(void *ptr, size_t size) argument
2238 _erealloc2(void *ptr, size_t size, size_t copy_size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) argument
2255 safe_address(size_t nmemb, size_t size, size_t offset) argument
2268 _safe_emalloc(size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) argument
2273 _safe_malloc(size_t nmemb, size_t size, size_t offset) argument
2278 _safe_erealloc(void *ptr, size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) argument
2283 _safe_realloc(void *ptr, size_t nmemb, size_t size, size_t offset) argument
[all...]
/PHP_TRUNK/ext/mysqlnd/
H A Dmysqlnd_alloc.h34 void * (*m_emalloc)(size_t size MYSQLND_MEM_D);
35 void * (*m_pemalloc)(size_t size, zend_bool persistent MYSQLND_MEM_D);
36 void * (*m_ecalloc)(unsigned int nmemb, size_t size MYSQLND_MEM_D);
37 void * (*m_pecalloc)(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D);
42 void * (*m_malloc)(size_t size MYSQLND_MEM_D);
43 void * (*m_calloc)(unsigned int nmemb, size_t size MYSQLND_MEM_D);
46 char * (*m_pestrndup)(const char * const ptr, size_t size, zend_bool persistent MYSQLND_MEM_D);
55 PHPAPI void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D);
56 PHPAPI void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D);
57 PHPAPI void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_
[all...]
H A Dmysqlnd_block_alloc.c38 if (chunk->ptr == (pool->arena + (pool->arena_size - pool->free_size - chunk->size))) {
43 pool->free_size += chunk->size;
57 mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int size) argument
63 if (chunk->ptr == (pool->arena + (pool->arena_size - pool->free_size - chunk->size))) {
68 if ((chunk->size + pool->free_size) < size) {
70 new_ptr = mnd_emalloc(size);
74 memcpy(new_ptr, chunk->ptr, chunk->size);
76 pool->free_size += chunk->size;
77 chunk->size
115 mysqlnd_mempool_get_chunk(MYSQLND_MEMORY_POOL * pool, unsigned int size) argument
[all...]
/PHP_TRUNK/main/streams/
H A Dphp_streams_int.h24 #define emalloc_rel_orig(size) \
26 ? _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_RELAY_CC) \
27 : _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC) )
29 #define erealloc_rel_orig(ptr, size) \
31 ? _erealloc((ptr), (size), 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_RELAY_CC) \
32 : _erealloc((ptr), (size), 0 ZEND_FILE_LINE_CC ZEND_FILE_LINE_ORIG_RELAY_CC) )
34 #define pemalloc_rel_orig(size, persistent) ((persistent) ? malloc((size)) : emalloc_rel_orig((size)))
35 #define perealloc_rel_orig(ptr, size, persisten
[all...]
/PHP_TRUNK/win32/
H A Dwinutil.h23 PHPAPI int php_win32_get_random_bytes(unsigned char *buf, size_t size);
/PHP_TRUNK/ext/pcre/pcrelib/sljit/
H A DsljitExecAllocator.c41 header contains the size of the previous and the next block. These sizes
43 Block size:
44 0 - The block is a free_block, with a different size member.
46 n - The block is used at the moment, and the value contains its size.
47 Previous block size:
49 n - The size of the previous block.
51 Using these size values we can go forward or backward on the block chain.
74 * the size is always divisible by CHUNK_SIZE
84 static SLJIT_INLINE void* alloc_chunk(sljit_uw size) argument
86 return VirtualAlloc(NULL, size, MEM_COMMI
89 free_chunk(void* chunk, sljit_uw size) argument
97 alloc_chunk(sljit_uw size) argument
114 free_chunk(void* chunk, sljit_uw size) argument
128 sljit_uw size; member in struct:block_header
136 sljit_uw size; member in struct:free_block
150 sljit_insert_free_block(struct free_block *free_block, sljit_uw size) argument
175 sljit_malloc_exec(sljit_uw size) argument
[all...]
/PHP_TRUNK/sapi/phpdbg/
H A Dphpdbg_win.c24 int mprotect(void *addr, size_t size, int protection) { argument
26 return (int)VirtualProtect(addr, size, protection == (PROT_READ | PROT_WRITE) ? PAGE_READWRITE : PAGE_READONLY, &var);
H A Dphpdbg_win.h31 int mprotect(void *addr, size_t size, int protection);
/PHP_TRUNK/ext/intl/
H A Dintl_common.h33 # define eumalloc(size) (UChar*)safe_emalloc(size, sizeof(UChar), 0)
37 # define eurealloc(ptr, size) (UChar*)erealloc((ptr), size * sizeof(UChar))
/PHP_TRUNK/ext/zip/lib/
H A Dzip_file_get_offset.c55 zip_int32_t size; local
65 if ((size=_zip_dirent_size(za->src, ZIP_EF_LOCAL, error)) < 0)
68 if (offset+(zip_uint32_t)size > ZIP_INT64_MAX) {
73 return offset + (zip_uint32_t)size;
H A Dzip_source_crc.c2 zip_source_crc.c -- pass-through source that calculates CRC32 and size
45 zip_uint64_t size; member in struct:crc_context
70 ctx->size = 0;
89 ctx->size = 0;
116 if ((st.valid & ZIP_STAT_SIZE) && st.size != ctx->size) {
130 ctx->size += (zip_uint64_t)n;
146 st->size = ctx->size;
148 st->comp_size = ctx->size;
[all...]
H A Dzip_source_win32utf8.c55 int size; local
65 size = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, fname, -1, NULL, 0);
66 if (size == 0) {
70 if ((wfname = (wchar_t *)malloc(sizeof(wchar_t) * size)) == NULL) {
74 MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, fname, -1, wfname, size);

Completed in 129 milliseconds

1234567891011