/freebsd-10.3-release/contrib/openpam/lib/libpam/ |
H A D | openpam_strlset.c | 48 openpam_strlset(char *str, int ch, size_t size) argument 52 for (len = 0; *str && size > 1; ++len, --size)
|
/freebsd-10.3-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.3-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.3-release/crypto/openssh/ |
H A D | xmalloc.c | 40 xmalloc(size_t size) argument 44 if (size == 0) 45 fatal("xmalloc: zero size"); 46 ptr = malloc(size); 48 fatal("xmalloc: out of memory (allocating %zu bytes)", size); 53 xcalloc(size_t nmemb, size_t size) argument 57 if (size == 0 || nmemb == 0) 58 fatal("xcalloc: zero size"); 59 if (SIZE_MAX / nmemb < size) 60 fatal("xcalloc: nmemb * size > SIZE_MA 69 xreallocarray(void *ptr, size_t nmemb, size_t size) argument [all...] |
/freebsd-10.3-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.3-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.3-release/contrib/gcc/config/ |
H A D | host-hpux.c | 56 hpux_gt_pch_get_address (size_t size, int fd) argument 60 addr = mmap ((void *)TRY_EMPTY_VM_SPACE, size, PROT_READ | PROT_WRITE, 67 munmap (addr, size); 88 hpux_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) argument 92 /* We're called with size == 0 if we're not planning to load a PCH 95 if (size == 0) 99 addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, offset); 105 munmap (addr, size); 108 addr = mmap (base, size, PROT_READ | PROT_WRITE, 114 munmap (addr, size); [all...] |
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.3-release/cddl/compat/opensolaris/misc/ |
H A D | zone.c | 38 size_t size; local 42 size = sizeof(jailid); 43 if (sysctlbyname("security.jail.jailed", &jailid, &size, NULL, 0) == -1)
|
/freebsd-10.3-release/sys/ofed/include/linux/ |
H A D | slab.h | 42 #define kmalloc(size, flags) malloc((size), M_KMALLOC, (flags)) 43 #define kvmalloc(size) kmalloc((size), 0) 44 #define kzalloc(size, flags) kmalloc((size), (flags) | M_ZERO) 45 #define kzalloc_node(size, flags, node) kzalloc(size, flags) 47 #define krealloc(ptr, size, flags) realloc((ptr), (size), M_KMALLO 63 kmem_ctor(void *mem, int size, void *arg, int flags) argument 74 kmem_cache_create(char *name, size_t size, size_t align, u_long flags, void (*ctor)(void *)) argument [all...] |
H A D | bitops.h | 81 find_first_bit(unsigned long *addr, unsigned long size) argument 86 for (bit = 0; size >= BITS_PER_LONG; 87 size -= BITS_PER_LONG, bit += BITS_PER_LONG, addr++) { 92 if (size) { 93 mask = (*addr) & BIT_MASK(size); 97 bit += size; 103 find_first_zero_bit(unsigned long *addr, unsigned long size) argument 108 for (bit = 0; size >= BITS_PER_LONG; 109 size -= BITS_PER_LONG, bit += BITS_PER_LONG, addr++) { 114 if (size) { 125 find_last_bit(unsigned long *addr, unsigned long size) argument 151 find_next_bit(unsigned long *addr, unsigned long size, unsigned long offset) argument 190 find_next_zero_bit(unsigned long *addr, unsigned long size, unsigned long offset) argument 230 bitmap_zero(unsigned long *addr, int size) argument 239 bitmap_fill(unsigned long *addr, int size) argument 252 bitmap_full(unsigned long *addr, int size) argument 273 bitmap_empty(unsigned long *addr, int size) argument 354 const int size = start + nr; local 375 const int size = start + nr; local [all...] |
H A D | mm.h | 49 * needed for size bytes. 52 get_order(unsigned long size) argument 56 size = (size - 1) >> PAGE_SHIFT; 58 while (size) { 60 size >>= 1; 77 unsigned long addr, unsigned long pfn, unsigned long size, 82 vma->vm_len = size; 76 io_remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn, unsigned long size, vm_memattr_t prot) argument
|
/freebsd-10.3-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.3-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.3-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.3-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.3-release/sys/ddb/ |
H A D | db_access.c | 57 db_get_value(db_addr_t addr, int size, boolean_t is_signed) argument 63 if (db_read_bytes(addr, size, data) != 0) { 71 for (i = 0; i < size; i++) 73 for (i = size - 1; i >= 0; i--) 79 if (size < 4) { 80 if (is_signed && (value & db_extend[size]) != 0) 81 value |= db_extend[size]; 87 db_put_value(db_addr_t addr, int size, db_expr_t value) argument 93 for (i = size - 1; i >= 0; i--) 95 for (i = 0; i < size; [all...] |
/freebsd-10.3-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.3-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; 68 int size; local 73 size = vsnprintf(NULL, 0, fmt, adx); 80 zdm = kmem_alloc(sizeof (zfs_dbgmsg_t) + size, KM_SLEEP); 84 (void) vsnprintf(zdm->zdm_msg, size + 1, fmt, adx); 91 zfs_dbgmsg_size += sizeof (zfs_dbgmsg_t) + size; 94 size = sizeof (zfs_dbgmsg_t) + strlen(zdm->zdm_msg); 95 kmem_free(zdm, size); [all...] |
/freebsd-10.3-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.3-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.3-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.3-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.3-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.3-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...] |