/freebsd-10.1-release/contrib/llvm/lib/Support/ |
H A D | MemoryObject.cpp | 17 uint64_t size, 22 if (current + size > limit) 25 while (current - address < size) { 16 readBytes(uint64_t address, uint64_t size, uint8_t* buf) const argument
|
/freebsd-10.1-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)
|
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.1-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 %zu bytes)", 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.1-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.1-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.1-release/contrib/ntp/sntp/unity/ |
H A D | unity_fixture_malloc_overrides.h | 16 void* unity_malloc(size_t size); 17 void* unity_calloc(size_t num, size_t size); 18 void* unity_realloc(void * oldMem, size_t size);
|
/freebsd-10.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-release/sys/ofed/include/linux/ |
H A D | slab.h | 42 #define kmalloc(size, flags) malloc((size), M_KMALLOC, (flags)) 43 #define kzalloc(size, flags) kmalloc((size), (flags) | M_ZERO) 44 #define kzalloc_node(size, flags, node) kzalloc(size, flags) 46 #define krealloc(ptr, size, flags) realloc((ptr), (size), M_KMALLOC, (flags)) 47 #define kcalloc(n, size, flags) kmalloc((n) * (size), flag 61 kmem_ctor(void *mem, int size, void *arg, int flags) argument 72 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 188 find_next_zero_bit(unsigned long *addr, unsigned long size, unsigned long offset) argument 226 bitmap_zero(unsigned long *addr, int size) argument 235 bitmap_fill(unsigned long *addr, int size) argument 248 bitmap_full(unsigned long *addr, int size) argument 269 bitmap_empty(unsigned long *addr, int size) argument 344 const int size = start + nr; local 365 const int size = start + nr; local [all...] |
/freebsd-10.1-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.1-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.1-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.1-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...] |