| /src/external/mit/libcbor/dist/test/ |
| memory_allocation_test.c | 16 // This test simulates cases when malloc unexpectedly fails and leaves a 23 MALLOC, 59 if (expectations[alloc_calls] == MALLOC) { 61 return malloc(size); 68 print_error("Unexpected call to malloc"); 123 MALLOC, MALLOC_FAIL); 128 WITH_MOCK_MALLOC({ assert_null(cbor_build_bytestring(bytes, 4)); }, 2, MALLOC, 136 WITH_MOCK_MALLOC({ assert_null(cbor_new_indefinite_string()); }, 2, MALLOC, 140 WITH_MOCK_MALLOC({ assert_null(cbor_build_string("Test")); }, 2, MALLOC, 144 WITH_MOCK_MALLOC({ assert_null(cbor_build_stringn("Test", 4)); }, 2, MALLOC, [all...] |
| /src/sys/arch/atari/stand/tostools/libtos/ |
| aout.c | 41 #define MALLOC(x) malloc(x) 50 #define MALLOC(x) alloc(x) 123 if ((od->kstart = (u_char *)MALLOC(od->ksize)) == NULL) 161 /* 4 */ "Cannot malloc kernel image space",
|
| elf.c | 40 #define MALLOC(x) malloc(x) 49 #define MALLOC(x) alloc(x) 91 if ((phdrs = (Elf32_Phdr *)MALLOC(i)) == NULL) 142 if ((od->kstart = (u_char *)MALLOC(od->ksize)) == NULL) 224 /* 1 */ "Cannot malloc Elf phdr storage space", 228 /* 5 */ "Cannot malloc kernel image space",
|
| /src/external/bsd/nvi/dist/common/ |
| util.c | 135 MALLOC(sp, copy, char *, (len + 1)); 154 MALLOC(sp, copy, CHAR_T *, (len + 1) * sizeof(CHAR_T));
|
| cut.c | 315 /* ANSI C doesn't define a call to malloc(3) for 0 bytes. */ 317 MALLOC(sp, tp->lb, CHAR_T *, tp->lb_len * sizeof(CHAR_T));
|
| screen.c | 103 MALLOC(sp, sp->newl, size_t *, len);
|
| mem.h | 20 /* Increase the size of a malloc'd buffer. Two versions, one that 60 * from a malloc'd buffer otherwise. Two versions, one that returns, one 147 * Malloc a buffer, casting the return pointer. Various versions. 150 * The cast should be unnecessary, malloc(3) and friends return void *'s, 174 #define MALLOC(sp, p, cast, size) { \ 175 if ((p = (cast)malloc(size)) == NULL) \ 179 if ((p = (cast)malloc(size)) == NULL) \ 183 p = (cast)malloc(size); \ 186 if ((p = (cast)malloc(size)) == NULL) { \ 197 malloc(size) : realloc(p, size))) == NULL) [all...] |
| /src/external/bsd/nvi/dist/perl_api/ |
| perlsfio.c | 85 MALLOC(scrp, disc, Sfdisc_t*, sizeof(Sfdisc_t));
|
| /src/external/bsd/top/dist/ |
| hash.m4c | 66 void *malloc(); 89 dnl # The m4 code uses MALLOC, FREE, and STRDUP for dynamic allocation. 92 define(`MALLOC', `malloc($1)') 162 qi = (llistitem *)MALLOC(sizeof(llistitem) + size); 236 result = (hash_table *)MALLOC(sizeof(hash_table)); 243 result->buckets = b = (bucket_t *)MALLOC(bytes);
|
| /src/lib/libc/gdtoa/ |
| g__fmt.c | 59 if ((decimalpoint_cache = MALLOC(strlen(s0) + 1)) != NULL) {
|
| gdtoaimp.h | 120 * #define MALLOC your_malloc, where your_malloc(n) acts like malloc(n) 122 * appropriate. If MALLOC is undefined, malloc will be invoked 125 * recycle memory acquired from MALLOC, #define FREE to be the 133 * suffices to get rid of MALLOC calls except for unusual cases, 223 #ifdef MALLOC 224 extern Char *MALLOC ANSI((size_t)); 226 #define MALLOC malloc [all...] |
| /src/external/bsd/nvi/dist/ex/ |
| ex_source.c | 61 * I'd like to test to see if the file is too large to malloc. Since 74 MALLOC(sp, bp, char *, (size_t)sb.st_size + 1);
|
| /src/external/bsd/ntp/dist/include/ |
| parse.h | 68 #define MALLOC(_X_) (char *)kmem_alloc(_X_) 72 #define MALLOC(_X_) (char *)kmem_alloc(_X_, KM_SLEEP) 76 #define MALLOC(_X_) malloc(_X_)
|
| /src/external/gpl2/gmake/dist/ |
| hash.c | 23 #define MALLOC(t, n) ((t *) xmalloc (sizeof (t) * (n))) 25 #define CLONE(o, t, n) ((t *) memcpy (MALLOC (t, (n)), (o), sizeof (t) * (n))) 292 user-supplied vector, or malloc one. */ 302 vector_0 = MALLOC (void *, ht->ht_fill + 1);
|
| /src/external/gpl2/gettext/dist/gettext-tools/libgrep/ |
| dfa.c | 119 ptr_t r = malloc(n); 139 #define MALLOC(p, t, n) ((p) = (t *) xmalloc((n) * sizeof (t))) 457 MALLOC(work_mbc->chars, wchar_t, chars_al); 531 MALLOC(work_mbc->ch_classes, wctype_t, ++ch_classes_al); 541 MALLOC(elem, char, len + 1); 548 MALLOC(work_mbc->equivs, char*, ++equivs_al); 559 MALLOC(work_mbc->coll_elems, char*, ++coll_elems_al); 605 MALLOC(work_mbc->range_sts, wchar_t, ++range_sts_al); 606 MALLOC(work_mbc->range_ends, wchar_t, ++range_ends_al); 1492 MALLOC(d->states[i].elems.elems, position, s->nelem) [all...] |
| /src/external/gpl2/grep/dist/src/ |
| dfa.c | 35 extern char *calloc(), *malloc(), *realloc(); 145 ptr_t r = malloc(n); 165 #define MALLOC(p, t, n) ((p) = (t *) xmalloc((n) * sizeof (t))) 483 MALLOC(work_mbc->chars, wchar_t, chars_al); 557 MALLOC(work_mbc->ch_classes, wctype_t, ++ch_classes_al); 567 MALLOC(elem, char, len + 1); 574 MALLOC(work_mbc->equivs, char*, ++equivs_al); 585 MALLOC(work_mbc->coll_elems, char*, ++coll_elems_al); 631 MALLOC(work_mbc->range_sts, wchar_t, ++range_sts_al); 632 MALLOC(work_mbc->range_ends, wchar_t, ++range_ends_al) [all...] |
| /src/sys/dev/stbi/ |
| stb_image.c | 438 #include <sys/malloc.h> 447 #define MALLOC(size) malloc((size), M_TEMP, M_WAITOK) 452 #define MALLOC(size) malloc((size)) 972 // assume data buffer is malloced, so malloc a new one and free that one 973 // only failure mode is malloc failing 988 good = MALLOC(req_comp * x * y); 1040 float *output = MALLOC(x * y * comp * sizeof(float)); 1058 stbi_uc *output = MALLOC(x * y * comp) [all...] |
| /src/external/bsd/byacc/dist/ |
| mstring.c | 40 buf_ptr = malloc(buf_len = 4096); 131 if ((n->base = n->ptr = MALLOC(HEAD)) != NULL)
|
| /src/sys/fs/nfs/client/ |
| nfs_clnode.c | 44 #include <sys/malloc.h> 114 MALLOC(nfhp, struct nfsfh *, sizeof (struct nfsfh) + fhsize, 163 MALLOC(np->n_fhp, struct nfsfh *, sizeof (struct nfsfh) + fhsize,
|
| nfs_clsubs.c | 58 #include <sys/malloc.h> 278 MALLOC(dp, struct nfsdmap *, sizeof (struct nfsdmap), 293 MALLOC(dp2, struct nfsdmap *, sizeof (struct nfsdmap),
|
| nfs_clcomsubs.c | 419 MALLOC(dp, struct nfsdmap *, sizeof (struct nfsdmap), 434 MALLOC(dp2, struct nfsdmap *, sizeof (struct nfsdmap),
|
| nfs_clport.c | 189 MALLOC(newd, struct nfsv4node *, 258 MALLOC(np->n_v4, struct nfsv4node *, sizeof (struct nfsv4node) 325 MALLOC(nfhp, struct nfsfh *, sizeof (struct nfsfh) + fhsize, 1360 buf = malloc(dumpmntopts.ndmnt_blen, M_TEMP, M_WAITOK);
|
| /src/external/zlib/pigz/dist/ |
| pigz.c | 306 #include <stdlib.h> /* exit(), malloc(), free(), realloc(), atol(), */ 332 # include <malloc/malloc.h> 335 # include <malloc.h> 338 # include <malloc.h> 561 ptr = malloc(size); 630 #define MALLOC(s) malloc_track(&mem_track, s) 679 me = MALLOC(sizeof(struct log)); 686 me->msg = MALLOC(strlen(msg) + 1); 760 yarn_mem(malloc, free) [all...] |
| /src/external/bsd/ntp/dist/libparse/ |
| parse.c | 802 parse->parse_pdata = MALLOC(parse->parse_plen); 805 parseprintf(DD_PARSE, ("set format failed: malloc for private data area failed\n")); 819 parse->parse_data = (char*)MALLOC((unsigned)(parse->parse_dsize * 2 + 2)); 826 parseprintf(DD_PARSE, ("init failed: malloc for data area failed\n"));
|
| /src/usr.sbin/syslogd/ |
| syslogd.h | 141 #define D_MEM 256 /* malloc/free */ 142 #define D_MEM2 1024 /* every single malloc/free */ 205 * - malloc()/calloc() only fails if not enough memory available 210 #define MALLOC(ptr, size) do { \ 211 while(!(ptr = malloc(size))) { \ 215 DPRINTF(D_MEM2, "MALLOC(%s@%p, %zu)\n", #ptr, ptr, size); \
|