/freebsd-10.0-release/contrib/ipfilter/lib/ |
H A D | binprint.c | 14 void binprint(ptr, size) 16 size_t size; 21 for (i = size, j = 0, s = (u_char *)ptr; i; i--, s++) {
|
/freebsd-10.0-release/contrib/ldns/compat/ |
H A D | calloc.c | 15 calloc(size_t num, size_t size) argument 17 void *new = malloc(num * size); 21 bzero(new, num * size);
|
/freebsd-10.0-release/contrib/openpam/lib/libpam/ |
H A D | openpam_strlcpy.c | 44 openpam_strlcpy(char *dst, const char *src, size_t size) argument 48 for (len = 0; *src && size > 1; ++len, --size)
|
/freebsd-10.0-release/crypto/openssh/ |
H A D | xmalloc.c | 28 xmalloc(size_t size) argument 32 if (size == 0) 33 fatal("xmalloc: zero size"); 34 ptr = malloc(size); 36 fatal("xmalloc: out of memory (allocating %lu bytes)", (u_long) size); 41 xcalloc(size_t nmemb, size_t size) argument 45 if (size == 0 || nmemb == 0) 46 fatal("xcalloc: zero size"); 47 if (SIZE_T_MAX / nmemb < size) 48 fatal("xcalloc: nmemb * size > SIZE_T_MA 57 xrealloc(void *ptr, size_t nmemb, size_t size) argument [all...] |
/freebsd-10.0-release/lib/libc/compat-43/ |
H A D | gethostid.c | 45 size_t size; local 50 size = sizeof value; 51 if (sysctl(mib, 2, &value, &size, NULL, 0) == -1)
|
/freebsd-10.0-release/lib/libc/stdlib/ |
H A D | reallocf.c | 33 reallocf(void *ptr, size_t size) argument 37 nptr = realloc(ptr, size); 42 * So, to avoid double free, call free() only when size != 0. 45 if (!nptr && ptr && size != 0)
|
/freebsd-10.0-release/contrib/bmake/ |
H A D | buf.c | 97 #define BUF_DEF_SIZE 256 /* Default buffer size */ 109 bp->size += max(bp->size, 16); 110 bp->buffer = bmake_realloc(bp->buffer, bp->size); 132 if (__predict_false(count + numBytes >= bp->size)) { 133 bp->size += max(bp->size, numBytes + 16); 134 bp->buffer = bmake_realloc(bp->buffer, bp->size); 190 * Initialize a buffer. If no initial size is given, a reasonable 194 * size Initia 206 Buf_Init(Buffer *bp, int size) argument [all...] |
/freebsd-10.0-release/sbin/hastd/ |
H A D | ebuf.h | 39 struct ebuf *ebuf_alloc(size_t size); 42 int ebuf_add_head(struct ebuf *eb, const void *data, size_t size); 43 int ebuf_add_tail(struct ebuf *eb, const void *data, size_t size); 45 void ebuf_del_head(struct ebuf *eb, size_t size); 46 void ebuf_del_tail(struct ebuf *eb, size_t size);
|
/freebsd-10.0-release/sys/pci/ |
H A D | locate.pl | 30 my ($label, $size) = /ncrcmd\s+(\S+)\s+\[([^]]+)/; 31 $size = eval($size); 34 if ($ofs + $size > $errpos) { 39 $ofs += $size;
|
/freebsd-10.0-release/contrib/libcxxrt/ |
H A D | memory.cc | 75 void* operator new(size_t size) argument 77 if (0 == size) 79 size = 1; 81 void * mem = malloc(size); 93 mem = malloc(size); 100 void* operator new(size_t size, const std::nothrow_t &) throw() argument 103 return :: operator new(size); 123 void * operator new[](size_t size) argument 128 return ::operator new(size); 133 void * operator new[](size_t size, cons argument [all...] |
/freebsd-10.0-release/lib/libkiconv/ |
H A D | kiconv_sysctl.c | 41 size_t size; local 43 if (sysctlbyname("kern.iconv.drvlist", NULL, &size, NULL, 0) == -1) 45 if (size > 0) { 48 drivers = malloc(size); 51 if (sysctlbyname("kern.iconv.drvlist", drivers, &size, NULL, 0) == -1) { 67 size_t i, size; local 70 if (sysctlbyname("kern.iconv.cslist", NULL, &size, NULL, 0) == -1) 72 if (size > 0) { 73 csi = malloc(size); 76 if (sysctlbyname("kern.iconv.cslist", csi, &size, NUL [all...] |
/freebsd-10.0-release/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ |
H A D | zfs_debug.c | 47 int size = sizeof (zfs_dbgmsg_t) + strlen(zdm->zdm_msg); local 48 kmem_free(zdm, size); 49 zfs_dbgmsg_size -= size; 65 int size; local 70 size = vsnprintf(NULL, 0, fmt, adx); 77 zdm = kmem_alloc(sizeof (zfs_dbgmsg_t) + size, KM_SLEEP); 81 (void) vsnprintf(zdm->zdm_msg, size + 1, fmt, adx); 88 zfs_dbgmsg_size += sizeof (zfs_dbgmsg_t) + size; 91 size = sizeof (zfs_dbgmsg_t) + strlen(zdm->zdm_msg); 92 kmem_free(zdm, size); [all...] |
/freebsd-10.0-release/cddl/contrib/opensolaris/tools/ctf/common/ |
H A D | memory.c | 48 xmalloc(size_t size) argument 52 if ((mem = malloc(size)) == NULL) 59 xcalloc(size_t size) argument 63 mem = xmalloc(size); 64 bzero(mem, size); 95 xrealloc(void *ptr, size_t size) argument 99 if ((mem = realloc(ptr, size)) == NULL)
|
/freebsd-10.0-release/contrib/gcc/config/ |
H A D | host-solaris.c | 36 sol_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) argument 40 /* We're called with size == 0 if we're not planning to load a PCH 43 if (size == 0) 46 addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, 59 munmap (addr, size); 62 for (i = 0; i < size; i += page_size) 69 if (i >= size) 70 addr = mmap (base, size,
|
/freebsd-10.0-release/usr.bin/m4/lib/ |
H A D | ohash_init.c | 25 ohash_init(struct ohash *h, unsigned int size, struct ohash_info *info) argument 27 h->size = 1UL << size; 28 if (h->size < MINSIZE) 29 h->size = MINSIZE; 32 STAT_HASH_SIZE += h->size; 40 h->t = (h->info.halloc)(sizeof(struct _ohash_record) * h->size,
|
/freebsd-10.0-release/contrib/binutils/libiberty/ |
H A D | xmalloc.c | 32 @deftypefn Replacement void* xrealloc (void *@var{ptr}, size_t @var{size}) 117 xmalloc_failed (size_t size) argument 130 (unsigned long) size, (unsigned long) allocated); 135 (unsigned long) size); 141 xmalloc (size_t size) argument 145 if (size == 0) 146 size = 1; 147 newmem = malloc (size); 149 xmalloc_failed (size); 170 xrealloc (PTR oldmem, size_t size) argument [all...] |
/freebsd-10.0-release/contrib/gcclibs/libiberty/ |
H A D | xmalloc.c | 32 @deftypefn Replacement void* xrealloc (void *@var{ptr}, size_t @var{size}) 117 xmalloc_failed (size_t size) argument 130 (unsigned long) size, (unsigned long) allocated); 135 (unsigned long) size); 141 xmalloc (size_t size) argument 145 if (size == 0) 146 size = 1; 147 newmem = malloc (size); 149 xmalloc_failed (size); 170 xrealloc (PTR oldmem, size_t size) argument [all...] |
/freebsd-10.0-release/contrib/jemalloc/src/ |
H A D | chunk_mmap.c | 7 static void *pages_map(void *addr, size_t size); 8 static void pages_unmap(void *addr, size_t size); 9 static void *chunk_alloc_mmap_slow(size_t size, size_t alignment, 15 pages_map(void *addr, size_t size) argument 19 assert(size != 0); 26 ret = VirtualAlloc(addr, size, MEM_COMMIT | MEM_RESERVE, 33 ret = mmap(addr, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, 43 if (munmap(ret, size) == -1) { 61 pages_unmap(void *addr, size_t size) argument 67 if (munmap(addr, size) 86 pages_trim(void *addr, size_t alloc_size, size_t leadsize, size_t size) argument 143 chunk_alloc_mmap_slow(size_t size, size_t alignment, bool *zero) argument 167 chunk_alloc_mmap(size_t size, size_t alignment, bool *zero) argument 203 chunk_dealloc_mmap(void *chunk, size_t size) argument [all...] |
H A D | chunk.c | 31 size_t arena_maxclass; /* Max size class for arenas. */ 37 extent_tree_t *chunks_ad, size_t size, size_t alignment, bool base, 40 extent_tree_t *chunks_ad, void *chunk, size_t size); 45 chunk_recycle(extent_tree_t *chunks_szad, extent_tree_t *chunks_ad, size_t size, argument 64 alloc_size = size + alignment - chunksize; 66 if (alloc_size < size) 69 key.size = alloc_size; 78 assert(node->size >= leadsize + size); 79 trailsize = node->size 145 chunk_alloc(size_t size, size_t alignment, bool base, bool *zero, dss_prec_t dss_prec) argument 213 chunk_record(extent_tree_t *chunks_szad, extent_tree_t *chunks_ad, void *chunk, size_t size) argument 301 chunk_unmap(void *chunk, size_t size) argument 315 chunk_dealloc(void *chunk, size_t size, bool unmap) argument [all...] |
/freebsd-10.0-release/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/ |
H A D | DWARFLocationDescription.cpp | 60 int size; local 85 case DW_OP_addr: size = address_size; break; 86 case DW_OP_const1u: size = 1; break; 87 case DW_OP_const1s: size = -1; break; 88 case DW_OP_const2u: size = 2; break; 89 case DW_OP_const2s: size = -2; break; 90 case DW_OP_const4u: size = 4; break; 91 case DW_OP_const4s: size = -4; break; 92 case DW_OP_const8u: size = 8; break; 93 case DW_OP_const8s: size [all...] |
/freebsd-10.0-release/contrib/gperf/src/ |
H A D | hash-table.cc | 38 /* We make the size of the hash table a power of 2. This allows for two 43 Hash_Table::Hash_Table (unsigned int size, bool ignore_length) argument 48 size = size * size_factor; 50 /* Find smallest power of 2 that is >= size. */ 52 if ((size >> 16) > 0) 54 size = size >> 16; 57 if ((size >> 8) > 0) 59 size [all...] |
/freebsd-10.0-release/contrib/groff/src/libs/libgroff/ |
H A D | putenv.c | 53 SIZE_T size; local 59 size = strlen(string); 61 if (!strncmp(*ep, string, size) && (*ep)[size] == '=') 73 size = 0; 79 ++size; 84 char **new_environ = (char **) malloc((size + 2) * sizeof(char *)); 87 (void) memcpy((PTR) new_environ, (PTR) environ, size * sizeof(char *)); 88 new_environ[size] = (char *) string; 89 new_environ[size [all...] |
/freebsd-10.0-release/sys/dev/drm/ |
H A D | drm_mm.h | 47 unsigned long size; member in struct:drm_mm_node 64 unsigned long size, 68 unsigned long size, 71 return drm_mm_get_block_generic(parent, size, alignment, 0); 74 unsigned long size, 77 return drm_mm_get_block_generic(parent, size, alignment, 1); 81 unsigned long size, 85 unsigned long size); 90 unsigned long size); 92 unsigned long size, in 67 drm_mm_get_block(struct drm_mm_node *parent, unsigned long size, unsigned alignment) argument 73 drm_mm_get_block_atomic(struct drm_mm_node *parent, unsigned long size, unsigned alignment) argument [all...] |
/freebsd-10.0-release/usr.bin/grep/regex/ |
H A D | xmalloc.h | 14 void *xmalloc_impl(size_t size, const char *file, int line, const char *func); 15 void *xcalloc_impl(size_t nmemb, size_t size, const char *file, int line, 48 #define xmalloc(size) xmalloc_impl(size, __FILE__, __LINE__, \ 50 #define xcalloc(nmemb, size) xcalloc_impl(nmemb, size, __FILE__, __LINE__, \ 69 #define xmalloc(size) malloc(size) 70 #define xcalloc(nmemb, size) calloc(nmemb, size) [all...] |
/freebsd-10.0-release/crypto/heimdal/lib/krb5/ |
H A D | store_mem.c | 39 size_t size; member in struct:mem_storage 44 mem_fetch(krb5_storage *sp, void *data, size_t size) argument 47 if(size > (size_t)(s->base + s->size - s->ptr)) 48 size = s->base + s->size - s->ptr; 49 memmove(data, s->ptr, size); 50 sp->seek(sp, size, SEEK_CUR); 51 return size; 55 mem_store(krb5_storage *sp, const void *data, size_t size) argument 66 mem_no_store(krb5_storage *sp, const void *data, size_t size) argument [all...] |