crypto/heimdal/kadmin/add-random-users.c
45
unsigned n, alloc;
crypto/heimdal/kadmin/add-random-users.c
54
alloc = n = 0;
crypto/heimdal/kadmin/add-random-users.c
59
if (n >= alloc) {
crypto/heimdal/kadmin/add-random-users.c
60
alloc = max(alloc + 16, alloc * 2);
crypto/heimdal/kadmin/add-random-users.c
61
w = erealloc (w, alloc * sizeof(char **));
crypto/heimdal/kpasswd/kpasswd-generator.c
41
unsigned n, alloc;
crypto/heimdal/kpasswd/kpasswd-generator.c
49
alloc = n = 0;
crypto/heimdal/kpasswd/kpasswd-generator.c
52
if (n >= alloc) {
crypto/heimdal/kpasswd/kpasswd-generator.c
53
alloc += 16;
crypto/heimdal/kpasswd/kpasswd-generator.c
54
w = erealloc (w, alloc * sizeof(char **));
crypto/heimdal/kuser/generate-requests.c
39
unsigned n, alloc;
crypto/heimdal/kuser/generate-requests.c
47
alloc = n = 0;
crypto/heimdal/kuser/generate-requests.c
50
if (n >= alloc) {
crypto/heimdal/kuser/generate-requests.c
51
alloc += 16;
crypto/heimdal/kuser/generate-requests.c
52
w = erealloc (w, alloc * sizeof(char **));
crypto/krb5/src/util/verto/ev.c
1731
static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul;
crypto/krb5/src/util/verto/ev.c
1736
alloc = cb;
crypto/krb5/src/util/verto/ev.c
1742
ptr = alloc (ptr, size);
crypto/openssh/sshbuf.c
104
if ((ret->cd = ret->d = calloc(1, ret->alloc)) == NULL) {
crypto/openssh/sshbuf.c
119
ret->alloc = ret->size = ret->max_size = len;
crypto/openssh/sshbuf.c
191
freezero(buf->d, buf->alloc);
crypto/openssh/sshbuf.c
208
if (buf->alloc != SSHBUF_SIZE_INIT) {
crypto/openssh/sshbuf.c
209
if ((d = recallocarray(buf->d, buf->alloc, SSHBUF_SIZE_INIT,
crypto/openssh/sshbuf.c
212
buf->alloc = SSHBUF_SIZE_INIT;
crypto/openssh/sshbuf.c
215
explicit_bzero(buf->d, buf->alloc);
crypto/openssh/sshbuf.c
227
return buf->alloc;
crypto/openssh/sshbuf.c
260
if (max_size < buf->alloc && max_size > buf->size) {
crypto/openssh/sshbuf.c
268
if ((dp = recallocarray(buf->d, buf->alloc, rlen, 1)) == NULL)
crypto/openssh/sshbuf.c
271
buf->alloc = rlen;
crypto/openssh/sshbuf.c
274
if (max_size < buf->alloc)
crypto/openssh/sshbuf.c
344
if (len + buf->size <= buf->alloc)
crypto/openssh/sshbuf.c
35
buf->size, buf->alloc, buf->off, buf->max_size); \
crypto/openssh/sshbuf.c
351
need = len + buf->size - buf->alloc;
crypto/openssh/sshbuf.c
352
rlen = ROUNDUP(buf->alloc + need, SSHBUF_SIZE_INC);
crypto/openssh/sshbuf.c
355
rlen = buf->alloc + need;
crypto/openssh/sshbuf.c
357
if ((dp = recallocarray(buf->d, buf->alloc, rlen, 1)) == NULL) {
crypto/openssh/sshbuf.c
361
buf->alloc = rlen;
crypto/openssh/sshbuf.c
48
size_t alloc; /* Total bytes allocated to buf->d */
crypto/openssh/sshbuf.c
64
buf->alloc > buf->max_size ||
crypto/openssh/sshbuf.c
65
buf->size > buf->alloc ||
crypto/openssh/sshbuf.c
99
ret->alloc = SSHBUF_SIZE_INIT;
crypto/openssh/sshkey.c
727
if (impl != NULL && impl->funcs->alloc != NULL) {
crypto/openssh/sshkey.c
728
if (impl->funcs->alloc(k) != 0) {
crypto/openssh/sshkey.h
172
int (*alloc)(struct sshkey *); /* optional */
crypto/openssl/crypto/dh/dh_key.c
418
int alloc)
crypto/openssl/crypto/dh/dh_key.c
433
if (pbuf_out != NULL && (alloc || *pbuf_out != NULL)) {
crypto/openssl/crypto/dh/dh_key.c
434
if (!alloc) {
crypto/openssl/crypto/dh/dh_key.c
451
if (alloc)
crypto/openssl/crypto/initthread.c
94
init_get_thread_local(CRYPTO_THREAD_LOCAL *local, int alloc, int keep)
crypto/openssl/crypto/initthread.c
98
if (alloc) {
crypto/openssl/crypto/ml_dsa/ml_dsa_sign.c
198
OPENSSL_clear_free(alloc, alloc_len);
crypto/openssl/crypto/ml_dsa/ml_dsa_sign.c
211
uint8_t *alloc = NULL, *w1_encoded;
crypto/openssl/crypto/ml_dsa/ml_dsa_sign.c
235
alloc = OPENSSL_malloc(w1_encoded_len
crypto/openssl/crypto/ml_dsa/ml_dsa_sign.c
237
if (alloc == NULL)
crypto/openssl/crypto/ml_dsa/ml_dsa_sign.c
243
w1_encoded = alloc;
crypto/openssl/crypto/ml_dsa/ml_dsa_sign.c
298
OPENSSL_free(alloc);
crypto/openssl/crypto/ml_dsa/ml_dsa_sign.c
60
uint8_t *alloc = NULL, *w1_encoded;
crypto/openssl/crypto/ml_dsa/ml_dsa_sign.c
84
alloc = OPENSSL_malloc(alloc_len);
crypto/openssl/crypto/ml_dsa/ml_dsa_sign.c
85
if (alloc == NULL)
crypto/openssl/crypto/ml_dsa/ml_dsa_sign.c
91
w1_encoded = alloc;
crypto/openssl/crypto/param_build.c
52
size_t size, size_t alloc, int type,
crypto/openssl/crypto/param_build.c
62
pd->alloc_blocks = ossl_param_bytes_to_blocks(alloc);
crypto/openssl/crypto/params_dup.c
126
OPENSSL_free(buf[OSSL_PARAM_BUF_PUBLIC].alloc);
crypto/openssl/crypto/params_dup.c
130
dst = (OSSL_PARAM *)buf[OSSL_PARAM_BUF_PUBLIC].alloc;
crypto/openssl/crypto/params_dup.c
133
ossl_param_set_secure_block(last, buf[OSSL_PARAM_BUF_SECURE].alloc,
crypto/openssl/crypto/params_dup.c
23
OSSL_PARAM_ALIGNED_BLOCK *alloc; /* The allocated buffer */
crypto/openssl/crypto/params_dup.c
39
out->alloc = is_secure ? OPENSSL_secure_zalloc(sz) : OPENSSL_zalloc(sz);
crypto/openssl/crypto/params_dup.c
40
if (out->alloc == NULL)
crypto/openssl/crypto/params_dup.c
43
out->cur = out->alloc + extra_blocks;
crypto/openssl/crypto/rsa/rsa_acvp_test_params.c
19
OSSL_PARAM *d, *alloc = NULL;
crypto/openssl/crypto/rsa/rsa_acvp_test_params.c
38
alloc = OPENSSL_zalloc(sizeof(settable));
crypto/openssl/crypto/rsa/rsa_acvp_test_params.c
39
if (alloc == NULL)
crypto/openssl/crypto/rsa/rsa_acvp_test_params.c
42
d = alloc;
crypto/openssl/crypto/rsa/rsa_acvp_test_params.c
56
ossl_rsa_acvp_test_gen_params_free(alloc);
crypto/openssl/crypto/rsa/rsa_acvp_test_params.c
57
alloc = NULL;
crypto/openssl/crypto/rsa/rsa_acvp_test_params.c
61
*dst = alloc;
crypto/openssl/include/crypto/dh.h
51
int alloc);
crypto/openssl/include/internal/json_enc.h
26
size_t alloc, cur;
crypto/openssl/include/internal/ring_buf.h
131
idx = r->head_offset % r->alloc;
crypto/openssl/include/internal/ring_buf.h
132
l = r->alloc - idx;
crypto/openssl/include/internal/ring_buf.h
155
idx = logical_offset % r->alloc;
crypto/openssl/include/internal/ring_buf.h
156
*max_len = r->alloc - idx;
crypto/openssl/include/internal/ring_buf.h
183
if (r->alloc == 0) {
crypto/openssl/include/internal/ring_buf.h
189
idx = logical_offset % r->alloc;
crypto/openssl/include/internal/ring_buf.h
191
if (l > r->alloc - idx)
crypto/openssl/include/internal/ring_buf.h
192
l = r->alloc - idx;
crypto/openssl/include/internal/ring_buf.h
208
if (cleanse && r->alloc > 0 && end > r->ctail_offset) {
crypto/openssl/include/internal/ring_buf.h
209
size_t idx = r->ctail_offset % r->alloc;
crypto/openssl/include/internal/ring_buf.h
216
if (l > r->alloc - idx) {
crypto/openssl/include/internal/ring_buf.h
217
OPENSSL_cleanse((unsigned char *)r->start + idx, r->alloc - idx);
crypto/openssl/include/internal/ring_buf.h
218
l -= r->alloc - idx;
crypto/openssl/include/internal/ring_buf.h
238
if (num_bytes == r->alloc)
crypto/openssl/include/internal/ring_buf.h
248
rnew.alloc = num_bytes;
crypto/openssl/include/internal/ring_buf.h
27
size_t alloc; /* size of buffer allocation in bytes */
crypto/openssl/include/internal/ring_buf.h
50
r->alloc = 0;
crypto/openssl/include/internal/ring_buf.h
58
OPENSSL_clear_free(r->start, r->alloc);
crypto/openssl/include/internal/ring_buf.h
62
r->alloc = 0;
crypto/openssl/include/internal/ring_buf.h
72
return r->alloc - ring_buf_used(r);
crypto/openssl/include/internal/ring_buf.h
94
idx = logical_offset % r->alloc;
crypto/openssl/include/internal/ring_buf.h
95
l = r->alloc - idx;
crypto/openssl/ssl/quic/json_enc.c
21
static int wbuf_init(struct json_write_buf *wbuf, BIO *bio, size_t alloc)
crypto/openssl/ssl/quic/json_enc.c
23
wbuf->buf = OPENSSL_malloc(alloc);
crypto/openssl/ssl/quic/json_enc.c
28
wbuf->alloc = alloc;
crypto/openssl/ssl/quic/json_enc.c
37
wbuf->alloc = 0;
crypto/openssl/ssl/quic/json_enc.c
54
return wbuf->alloc - wbuf->cur;
crypto/openssl/ssl/quic/quic_sstream.c
364
return qss->ring_buf.alloc;
crypto/openssl/ssl/rio/poll_builder.c
45
static int rpb_ensure_alloc(RIO_POLL_BUILDER *rpb, size_t alloc)
crypto/openssl/ssl/rio/poll_builder.c
51
if (alloc <= rpb->pfd_alloc)
crypto/openssl/ssl/rio/poll_builder.c
54
total_size = safe_mul_size_t(alloc, sizeof(struct pollfd), &error);
crypto/openssl/ssl/rio/poll_builder.c
67
rpb->pfd_alloc = alloc;
crypto/openssl/test/wpackettest.c
135
|| !TEST_mem_eq(sbuf, written, alloc, sizeof(alloc)))
crypto/openssl/test/wpackettest.c
22
static const unsigned char alloc[] = { 0x02, 0xfe, 0xff };
crypto/openssl/test/wpackettest.c
342
|| !TEST_mem_eq(buf->data, written, alloc, sizeof(alloc)))
crypto/openssl/test/wpackettest.c
369
|| !TEST_mem_eq(buf->data, written, alloc, sizeof(alloc)))
include/malloc_np.h
62
extent_alloc_t *alloc;
lib/libc/stdlib/malloc/jemalloc/include/jemalloc/jemalloc.h
385
extent_alloc_t *alloc;
lib/libc/stdlib/malloc/jemalloc/include/jemalloc/jemalloc_typedefs.h
68
extent_alloc_t *alloc;
lib/libopenbsd/ohash.c
199
h->info.alloc = info->alloc;
lib/libopenbsd/ohash.c
51
p = (i->alloc)(i->key_offset + (*end - start) + 1, i->data);
lib/libopenbsd/ohash.h
34
void *(*alloc)(size_t, void *);
sbin/dhclient/clparse.c
797
alloc:
sbin/dhclient/clparse.c
820
goto alloc;
sbin/dhclient/clparse.c
829
goto alloc;
sbin/dhclient/clparse.c
838
goto alloc;
sbin/dhclient/clparse.c
860
goto alloc;
sbin/newfs/mkfs.c
925
node.dp1.di_db[0] = alloc(sblock.fs_fsize, node.dp1.di_mode);
sbin/newfs/mkfs.c
940
alloc(sblock.fs_fsize, node.dp1.di_mode);
sbin/newfs/mkfs.c
962
node.dp2.di_db[0] = alloc(sblock.fs_fsize, node.dp2.di_mode);
sbin/newfs/mkfs.c
977
alloc(sblock.fs_fsize, node.dp2.di_mode);
sbin/newfs/mkfs.c
98
static ufs2_daddr_t alloc(int size, int mode);
sys/cam/ctl/ctl.c
814
alloc:
sys/cam/ctl/ctl.c
825
goto alloc;
sys/dev/acpica/acpi.c
2349
ACPI_MCFG_ALLOCATION *alloc, *end;
sys/dev/acpica/acpi.c
2357
alloc = (ACPI_MCFG_ALLOCATION *)((ACPI_TABLE_MCFG *)hdr + 1);
sys/dev/acpica/acpi.c
2358
while (alloc < end) {
sys/dev/acpica/acpi.c
2359
pcie_cfgregopen(alloc->Address, alloc->PciSegment,
sys/dev/acpica/acpi.c
2360
alloc->StartBusNumber, alloc->EndBusNumber);
sys/dev/acpica/acpi.c
2361
alloc++;
sys/dev/agp/agp.c
760
agp_allocate_user(device_t dev, agp_allocate *alloc)
sys/dev/agp/agp.c
765
alloc->type,
sys/dev/agp/agp.c
766
alloc->pg_count << AGP_PAGE_SHIFT);
sys/dev/agp/agp.c
768
alloc->key = mem->am_id;
sys/dev/agp/agp.c
769
alloc->physical = mem->am_physical;
sys/dev/ata/ata-all.c
154
if (ch->dma.alloc)
sys/dev/ata/ata-all.c
155
ch->dma.alloc(dev);
sys/dev/ata/ata-all.h
359
void (*alloc)(device_t dev);
sys/dev/ata/ata-dma.c
70
if (ch->dma.alloc == NULL)
sys/dev/ata/ata-dma.c
71
ch->dma.alloc = ata_dmaalloc;
sys/dev/cxgbe/cudbg/cudbg_entity.h
325
u32 alloc;
sys/dev/cxgbe/cudbg/cudbg_entity.h
331
u32 alloc;
sys/dev/cxgbe/cudbg/cudbg_lib.c
1061
alloc = G_T5_ALLOC(lo);
sys/dev/cxgbe/cudbg/cudbg_lib.c
1064
alloc = G_ALLOC(lo);
sys/dev/cxgbe/cudbg/cudbg_lib.c
1067
meminfo_buff->port_alloc[i] = alloc;
sys/dev/cxgbe/cudbg/cudbg_lib.c
1078
alloc = G_T5_ALLOC(lo);
sys/dev/cxgbe/cudbg/cudbg_lib.c
1081
alloc = G_ALLOC(lo);
sys/dev/cxgbe/cudbg/cudbg_lib.c
1084
meminfo_buff->loopback_alloc[i] = alloc;
sys/dev/cxgbe/cudbg/cudbg_lib.c
841
u32 used, alloc;
sys/dev/cxgbe/iw_cxgbe/id_table.c
100
spin_lock_init(&alloc->lock);
sys/dev/cxgbe/iw_cxgbe/id_table.c
101
alloc->table = kmalloc(BITS_TO_LONGS(num) * sizeof(long),
sys/dev/cxgbe/iw_cxgbe/id_table.c
103
if (!alloc->table)
sys/dev/cxgbe/iw_cxgbe/id_table.c
106
bitmap_zero(alloc->table, num);
sys/dev/cxgbe/iw_cxgbe/id_table.c
107
if (!(alloc->flags & C4IW_ID_TABLE_F_EMPTY))
sys/dev/cxgbe/iw_cxgbe/id_table.c
109
set_bit(i, alloc->table);
sys/dev/cxgbe/iw_cxgbe/id_table.c
114
void c4iw_id_table_free(struct c4iw_id_table *alloc)
sys/dev/cxgbe/iw_cxgbe/id_table.c
116
kfree(alloc->table);
sys/dev/cxgbe/iw_cxgbe/id_table.c
49
u32 c4iw_id_alloc(struct c4iw_id_table *alloc)
sys/dev/cxgbe/iw_cxgbe/id_table.c
54
spin_lock_irqsave(&alloc->lock, flags);
sys/dev/cxgbe/iw_cxgbe/id_table.c
56
obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last);
sys/dev/cxgbe/iw_cxgbe/id_table.c
57
if (obj >= alloc->max)
sys/dev/cxgbe/iw_cxgbe/id_table.c
58
obj = find_first_zero_bit(alloc->table, alloc->max);
sys/dev/cxgbe/iw_cxgbe/id_table.c
60
if (obj < alloc->max) {
sys/dev/cxgbe/iw_cxgbe/id_table.c
61
if (alloc->flags & C4IW_ID_TABLE_F_RANDOM)
sys/dev/cxgbe/iw_cxgbe/id_table.c
62
alloc->last += arc4random() % RANDOM_SKIP;
sys/dev/cxgbe/iw_cxgbe/id_table.c
64
alloc->last = obj + 1;
sys/dev/cxgbe/iw_cxgbe/id_table.c
65
if (alloc->last >= alloc->max)
sys/dev/cxgbe/iw_cxgbe/id_table.c
66
alloc->last = 0;
sys/dev/cxgbe/iw_cxgbe/id_table.c
67
set_bit(obj, alloc->table);
sys/dev/cxgbe/iw_cxgbe/id_table.c
68
obj += alloc->start;
sys/dev/cxgbe/iw_cxgbe/id_table.c
72
spin_unlock_irqrestore(&alloc->lock, flags);
sys/dev/cxgbe/iw_cxgbe/id_table.c
76
void c4iw_id_free(struct c4iw_id_table *alloc, u32 obj)
sys/dev/cxgbe/iw_cxgbe/id_table.c
80
obj -= alloc->start;
sys/dev/cxgbe/iw_cxgbe/id_table.c
83
spin_lock_irqsave(&alloc->lock, flags);
sys/dev/cxgbe/iw_cxgbe/id_table.c
84
clear_bit(obj, alloc->table);
sys/dev/cxgbe/iw_cxgbe/id_table.c
85
spin_unlock_irqrestore(&alloc->lock, flags);
sys/dev/cxgbe/iw_cxgbe/id_table.c
88
int c4iw_id_table_alloc(struct c4iw_id_table *alloc, u32 start, u32 num,
sys/dev/cxgbe/iw_cxgbe/id_table.c
93
alloc->start = start;
sys/dev/cxgbe/iw_cxgbe/id_table.c
94
alloc->flags = flags;
sys/dev/cxgbe/iw_cxgbe/id_table.c
96
alloc->last = arc4random() % RANDOM_SKIP;
sys/dev/cxgbe/iw_cxgbe/id_table.c
98
alloc->last = 0;
sys/dev/cxgbe/iw_cxgbe/id_table.c
99
alloc->max = num;
sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
894
u32 c4iw_id_alloc(struct c4iw_id_table *alloc);
sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
895
void c4iw_id_free(struct c4iw_id_table *alloc, u32 obj);
sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
896
int c4iw_id_table_alloc(struct c4iw_id_table *alloc, u32 start, u32 num,
sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
898
void c4iw_id_table_free(struct c4iw_id_table *alloc);
sys/dev/cxgbe/t4_main.c
10462
uint32_t lo, hi, used, free, alloc;
sys/dev/cxgbe/t4_main.c
10797
alloc = G_T5_ALLOC(lo);
sys/dev/cxgbe/t4_main.c
10800
alloc = G_ALLOC(lo);
sys/dev/cxgbe/t4_main.c
10804
i, used, alloc);
sys/dev/cxgbe/t4_main.c
10813
alloc = G_T5_ALLOC(lo);
sys/dev/cxgbe/t4_main.c
10816
alloc = G_ALLOC(lo);
sys/dev/cxgbe/t4_main.c
10821
i, used, alloc);
sys/dev/dpaa2/dpaa2_buf.c
61
const int alloc = DPAA2_ATOMIC_READ(&sc->buf_num);
sys/dev/dpaa2/dpaa2_buf.c
75
count = (alloc + count > DPAA2_NI_BUFS_MAX)
sys/dev/dpaa2/dpaa2_buf.c
76
? DPAA2_NI_BUFS_MAX - alloc : count;
sys/dev/dpaa2/dpaa2_buf.c
80
for (int i = alloc; i < alloc + count; i++) {
sys/dev/iwx/if_iwx.c
3346
cmd.alloc.sta_id_mask = htole32(1 << IWX_STATION_ID);
sys/dev/iwx/if_iwx.c
3347
cmd.alloc.tid = tid;
sys/dev/iwx/if_iwx.c
3348
cmd.alloc.ssn = htole16(ssn);
sys/dev/iwx/if_iwx.c
3349
cmd.alloc.win_size = htole16(winsize);
sys/dev/iwx/if_iwxreg.h
5425
struct iwx_rx_baid_cfg_cmd_alloc alloc;
sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c
1453
int alloc)
sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c
1475
if (r->com.state == RES_QP_MAPPED && !alloc)
sys/dev/mlx4/mlx4_core/mlx4_resource_tracker.c
1483
if ((r->com.state == RES_QP_RESERVED && alloc) ||
sys/dev/mthca/mthca_allocator.c
100
set_bit(i, alloc->table);
sys/dev/mthca/mthca_allocator.c
105
void mthca_alloc_cleanup(struct mthca_alloc *alloc)
sys/dev/mthca/mthca_allocator.c
107
kfree(alloc->table);
sys/dev/mthca/mthca_allocator.c
40
u32 mthca_alloc(struct mthca_alloc *alloc)
sys/dev/mthca/mthca_allocator.c
45
spin_lock_irqsave(&alloc->lock, flags);
sys/dev/mthca/mthca_allocator.c
47
obj = find_next_zero_bit(alloc->table, alloc->max, alloc->last);
sys/dev/mthca/mthca_allocator.c
48
if (obj >= alloc->max) {
sys/dev/mthca/mthca_allocator.c
49
alloc->top = (alloc->top + alloc->max) & alloc->mask;
sys/dev/mthca/mthca_allocator.c
50
obj = find_first_zero_bit(alloc->table, alloc->max);
sys/dev/mthca/mthca_allocator.c
53
if (obj < alloc->max) {
sys/dev/mthca/mthca_allocator.c
54
set_bit(obj, alloc->table);
sys/dev/mthca/mthca_allocator.c
55
obj |= alloc->top;
sys/dev/mthca/mthca_allocator.c
59
spin_unlock_irqrestore(&alloc->lock, flags);
sys/dev/mthca/mthca_allocator.c
64
void mthca_free(struct mthca_alloc *alloc, u32 obj)
sys/dev/mthca/mthca_allocator.c
68
obj &= alloc->max - 1;
sys/dev/mthca/mthca_allocator.c
70
spin_lock_irqsave(&alloc->lock, flags);
sys/dev/mthca/mthca_allocator.c
72
clear_bit(obj, alloc->table);
sys/dev/mthca/mthca_allocator.c
73
alloc->last = min(alloc->last, obj);
sys/dev/mthca/mthca_allocator.c
74
alloc->top = (alloc->top + alloc->max) & alloc->mask;
sys/dev/mthca/mthca_allocator.c
76
spin_unlock_irqrestore(&alloc->lock, flags);
sys/dev/mthca/mthca_allocator.c
79
int mthca_alloc_init(struct mthca_alloc *alloc, u32 num, u32 mask,
sys/dev/mthca/mthca_allocator.c
88
alloc->last = 0;
sys/dev/mthca/mthca_allocator.c
89
alloc->top = 0;
sys/dev/mthca/mthca_allocator.c
90
alloc->max = num;
sys/dev/mthca/mthca_allocator.c
91
alloc->mask = mask;
sys/dev/mthca/mthca_allocator.c
92
spin_lock_init(&alloc->lock);
sys/dev/mthca/mthca_allocator.c
93
alloc->table = kmalloc(BITS_TO_LONGS(num) * sizeof (long),
sys/dev/mthca/mthca_allocator.c
95
if (!alloc->table)
sys/dev/mthca/mthca_allocator.c
98
bitmap_zero(alloc->table, num);
sys/dev/mthca/mthca_av.c
172
index = mthca_alloc(&dev->av_table.alloc);
sys/dev/mthca/mthca_av.c
244
mthca_free(&dev->av_table.alloc,
sys/dev/mthca/mthca_av.c
331
err = mthca_alloc_init(&dev->av_table.alloc,
sys/dev/mthca/mthca_av.c
361
mthca_alloc_cleanup(&dev->av_table.alloc);
sys/dev/mthca/mthca_av.c
373
mthca_alloc_cleanup(&dev->av_table.alloc);
sys/dev/mthca/mthca_cq.c
784
cq->cqn = mthca_alloc(&dev->cq_table.alloc);
sys/dev/mthca/mthca_cq.c
887
mthca_free(&dev->cq_table.alloc, cq->cqn);
sys/dev/mthca/mthca_cq.c
952
mthca_free(&dev->cq_table.alloc, cq->cqn);
sys/dev/mthca/mthca_cq.c
962
err = mthca_alloc_init(&dev->cq_table.alloc,
sys/dev/mthca/mthca_cq.c
972
mthca_alloc_cleanup(&dev->cq_table.alloc);
sys/dev/mthca/mthca_cq.c
980
mthca_alloc_cleanup(&dev->cq_table.alloc);
sys/dev/mthca/mthca_dev.h
197
struct mthca_alloc alloc;
sys/dev/mthca/mthca_dev.h
203
struct mthca_alloc alloc;
sys/dev/mthca/mthca_dev.h
229
struct mthca_alloc alloc;
sys/dev/mthca/mthca_dev.h
242
struct mthca_alloc alloc;
sys/dev/mthca/mthca_dev.h
249
struct mthca_alloc alloc;
sys/dev/mthca/mthca_dev.h
256
struct mthca_alloc alloc;
sys/dev/mthca/mthca_dev.h
272
struct mthca_alloc alloc;
sys/dev/mthca/mthca_dev.h
277
struct mthca_alloc alloc;
sys/dev/mthca/mthca_dev.h
416
u32 mthca_alloc(struct mthca_alloc *alloc);
sys/dev/mthca/mthca_dev.h
417
void mthca_free(struct mthca_alloc *alloc, u32 obj);
sys/dev/mthca/mthca_dev.h
418
int mthca_alloc_init(struct mthca_alloc *alloc, u32 num, u32 mask,
sys/dev/mthca/mthca_dev.h
420
void mthca_alloc_cleanup(struct mthca_alloc *alloc);
sys/dev/mthca/mthca_eq.c
514
eq->eqn = mthca_alloc(&dev->eq_table.alloc);
sys/dev/mthca/mthca_eq.c
568
mthca_free(&dev->eq_table.alloc, eq->eqn);
sys/dev/mthca/mthca_eq.c
773
err = mthca_alloc_init(&dev->eq_table.alloc,
sys/dev/mthca/mthca_eq.c
884
mthca_alloc_cleanup(&dev->eq_table.alloc);
sys/dev/mthca/mthca_eq.c
904
mthca_alloc_cleanup(&dev->eq_table.alloc);
sys/dev/mthca/mthca_mcg.c
148
index = mthca_alloc(&dev->mcg_table.alloc);
sys/dev/mthca/mthca_mcg.c
206
mthca_free(&dev->mcg_table.alloc, index);
sys/dev/mthca/mthca_mcg.c
286
mthca_free(&dev->mcg_table.alloc, amgm_index_to_free);
sys/dev/mthca/mthca_mcg.c
305
mthca_free(&dev->mcg_table.alloc, index);
sys/dev/mthca/mthca_mcg.c
320
err = mthca_alloc_init(&dev->mcg_table.alloc,
sys/dev/mthca/mthca_mcg.c
334
mthca_alloc_cleanup(&dev->mcg_table.alloc);
sys/dev/mthca/mthca_memfree.c
609
goto alloc;
sys/dev/mthca/mthca_memfree.c
624
alloc:
sys/dev/mthca/mthca_pd.c
46
pd->pd_num = mthca_alloc(&dev->pd_table.alloc);
sys/dev/mthca/mthca_pd.c
56
mthca_free(&dev->pd_table.alloc, pd->pd_num);
sys/dev/mthca/mthca_pd.c
66
mthca_free(&dev->pd_table.alloc, pd->pd_num);
sys/dev/mthca/mthca_pd.c
71
return mthca_alloc_init(&dev->pd_table.alloc,
sys/dev/mthca/mthca_pd.c
80
mthca_alloc_cleanup(&dev->pd_table.alloc);
sys/dev/mthca/mthca_qp.c
1296
qp->qpn = mthca_alloc(&dev->qp_table.alloc);
sys/dev/mthca/mthca_qp.c
1306
mthca_free(&dev->qp_table.alloc, qp->qpn);
sys/dev/mthca/mthca_qp.c
1480
mthca_free(&dev->qp_table.alloc, qp->qpn);
sys/dev/mthca/mthca_qp.c
2272
err = mthca_alloc_init(&dev->qp_table.alloc,
sys/dev/mthca/mthca_qp.c
2283
mthca_alloc_cleanup(&dev->qp_table.alloc);
sys/dev/mthca/mthca_qp.c
2303
mthca_alloc_cleanup(&dev->qp_table.alloc);
sys/dev/mthca/mthca_qp.c
2316
mthca_alloc_cleanup(&dev->qp_table.alloc);
sys/dev/mthca/mthca_srq.c
231
srq->srqn = mthca_alloc(&dev->srq_table.alloc);
sys/dev/mthca/mthca_srq.c
316
mthca_free(&dev->srq_table.alloc, srq->srqn);
sys/dev/mthca/mthca_srq.c
362
mthca_free(&dev->srq_table.alloc, srq->srqn);
sys/dev/mthca/mthca_srq.c
676
err = mthca_alloc_init(&dev->srq_table.alloc,
sys/dev/mthca/mthca_srq.c
686
mthca_alloc_cleanup(&dev->srq_table.alloc);
sys/dev/mthca/mthca_srq.c
697
mthca_alloc_cleanup(&dev->srq_table.alloc);
sys/dev/mthca/mthca_uar.c
38
uar->index = mthca_alloc(&dev->uar_table.alloc);
sys/dev/mthca/mthca_uar.c
49
mthca_free(&dev->uar_table.alloc, uar->index);
sys/dev/mthca/mthca_uar.c
56
ret = mthca_alloc_init(&dev->uar_table.alloc,
sys/dev/mthca/mthca_uar.c
65
mthca_alloc_cleanup(&dev->uar_table.alloc);
sys/dev/mthca/mthca_uar.c
75
mthca_alloc_cleanup(&dev->uar_table.alloc);
sys/dev/ocs_fc/ocs_hw_queues.c
2243
buf->header.dma.alloc = buf;
sys/dev/ocs_fc/ocs_hw_queues.c
2471
ocs_hw_auto_xfer_rdy_buffer_t *buf = seq->header->dma.alloc;
sys/dev/ocs_fc/ocs_hw_queues.c
2492
buf->header.dma.alloc = buf;
sys/dev/ocs_fc/ocs_os.c
389
dma->alloc = dma->virt;
sys/dev/ocs_fc/ocs_os.h
445
void *alloc; /**< originally allocated virtual address used to restore virt if modified */
sys/dev/pci/pci.c
1164
int alloc, new_alloc;
sys/dev/pci/pci.c
1166
alloc = roundup2(needed, 8);
sys/dev/pci/pci.c
1168
if (alloc != new_alloc) {
sys/dev/sound/pcm/feeder_rate.c
1333
dumpz(alloc);
sys/fs/ext2fs/ext2_alloc.c
1380
SDT_PROBE3(ext2fs, , alloc,
sys/fs/ext2fs/ext2_alloc.c
1431
SDT_PROBE2(ext2fs, , alloc, ext2_blkfree_bad_block,
sys/fs/ext2fs/ext2_alloc.c
146
SDT_PROBE2(ext2fs, , alloc, trace, 1, "cannot allocate data block");
sys/fs/ext2fs/ext2_alloc.c
1490
SDT_PROBE2(ext2fs, , alloc, ext2_vfree_doublefree,
sys/fs/ext2fs/ext2_alloc.c
166
SDT_PROBE2(ext2fs, , alloc, trace, 1, "cannot allocate meta block");
sys/fs/ext2fs/ext2_alloc.c
309
SDT_PROBE3(ext2fs, , alloc, ext2_reallocblks_realloc,
sys/fs/ext2fs/ext2_alloc.c
321
SDT_PROBE1(ext2fs, , alloc, ext2_reallocblks_bap, *bap);
sys/fs/ext2fs/ext2_alloc.c
361
SDT_PROBE1(ext2fs, , alloc, ext2_reallocblks_blkno, blkno);
sys/fs/ext2fs/ext2_alloc.c
487
SDT_PROBE2(ext2fs, , alloc, trace, 1, "out of inodes");
sys/fs/ext2fs/ext2_alloc.c
62
SDT_PROBE_DEFINE2(ext2fs, , alloc, trace, "int", "char*");
sys/fs/ext2fs/ext2_alloc.c
63
SDT_PROBE_DEFINE3(ext2fs, , alloc, ext2_reallocblks_realloc,
sys/fs/ext2fs/ext2_alloc.c
65
SDT_PROBE_DEFINE1(ext2fs, , alloc, ext2_reallocblks_bap, "uint32_t");
sys/fs/ext2fs/ext2_alloc.c
66
SDT_PROBE_DEFINE1(ext2fs, , alloc, ext2_reallocblks_blkno, "e2fs_daddr_t");
sys/fs/ext2fs/ext2_alloc.c
67
SDT_PROBE_DEFINE2(ext2fs, , alloc, ext2_b_bitmap_validate_error, "char*", "int");
sys/fs/ext2fs/ext2_alloc.c
68
SDT_PROBE_DEFINE3(ext2fs, , alloc, ext2_nodealloccg_bmap_corrupted,
sys/fs/ext2fs/ext2_alloc.c
70
SDT_PROBE_DEFINE2(ext2fs, , alloc, ext2_blkfree_bad_block, "ino_t", "e4fs_daddr_t");
sys/fs/ext2fs/ext2_alloc.c
71
SDT_PROBE_DEFINE2(ext2fs, , alloc, ext2_vfree_doublefree, "char*", "ino_t");
sys/fs/ext2fs/ext2_alloc.c
969
SDT_PROBE2(ext2fs, , alloc, ext2_b_bitmap_validate_error,
sys/fs/ext2fs/ext2_alloc.c
977
SDT_PROBE2(ext2fs, , alloc, ext2_b_bitmap_validate_error,
sys/fs/ext2fs/ext2_alloc.c
985
SDT_PROBE2(ext2fs, , alloc, ext2_b_bitmap_validate_error,
sys/fs/ext2fs/ext2_extents.c
603
int error, depth, i, ppos, alloc;
sys/fs/ext2fs/ext2_extents.c
608
alloc = 0;
sys/fs/ext2fs/ext2_extents.c
623
alloc = 1;
sys/fs/ext2fs/ext2_extents.c
681
if (alloc)
sys/fs/pseudofs/pseudofs_vncache.c
130
goto alloc;
sys/fs/pseudofs/pseudofs_vncache.c
158
alloc:
sys/kern/kern_malloc.c
1014
unsigned long alloc;
sys/kern/kern_malloc.c
1037
alloc = redzone_get_size(addr);
sys/kern/kern_malloc.c
1048
alloc = zone->uz_size;
sys/kern/kern_malloc.c
1051
alloc = malloc_large_size(slab);
sys/kern/kern_malloc.c
1062
if (size <= alloc &&
sys/kern/kern_malloc.c
1063
(size > (alloc >> REALLOC_FRACTION) || alloc == MINALLOCSIZE)) {
sys/kern/kern_malloc.c
1064
kasan_mark((void *)addr, size, alloc, KASAN_MALLOC_REDZONE);
sys/kern/kern_malloc.c
1077
kasan_mark(addr, alloc, alloc, 0);
sys/kern/kern_malloc.c
1078
bcopy(addr, newaddr, min(size, alloc));
sys/kern/subr_unit.c
1092
uh, uh->low, uh->high, uh->first, uh->last, uh->busy, uh->alloc);
sys/kern/subr_unit.c
381
KASSERT (z == uh->alloc,
sys/kern/subr_unit.c
383
uh->alloc, z, line));
sys/kern/subr_unit.c
406
uh->alloc++;
sys/kern/subr_unit.c
424
uh->alloc--;
sys/kern/subr_unit.c
477
uh->alloc = 0;
sys/kern/subr_unit.c
503
KASSERT(uh->alloc == 0, ("UNR memory leak in delete_unrhdr"));
sys/kern/subr_unit.c
523
uh->alloc = 0;
sys/kern/vfs_subr.c
2002
goto alloc;
sys/kern/vfs_subr.c
2018
goto alloc;
sys/kern/vfs_subr.c
2038
alloc:
sys/kern/vfs_vnops.c
2564
vn_vget_ino_gen(struct vnode *vp, vn_get_ino_t alloc, void *alloc_arg,
sys/kern/vfs_vnops.c
2590
error = alloc(mp, alloc_arg, lkflags, rvp);
sys/net/vnet.c
222
SDT_PROBE_DEFINE2(vnet, functions, vnet_alloc, alloc, "int",
sys/net/vnet.c
252
SDT_PROBE2(vnet, functions, vnet_alloc, alloc, __LINE__, vnet);
sys/net80211/ieee80211_output.c
2474
bool alloc)
sys/net80211/ieee80211_output.c
2480
if (!alloc && (frmp == NULL || frmlen == NULL))
sys/net80211/ieee80211_output.c
2484
if (!alloc && len > *frmlen)
sys/net80211/ieee80211_output.c
2491
if (alloc) {
sys/net80211/ieee80211_output.c
2544
if (!alloc) {
sys/netipsec/xform_ah.c
277
int ad, alloc, nxt, noff;
sys/netipsec/xform_ah.c
446
alloc = 1;
sys/netipsec/xform_ah.c
451
alloc = 0;
sys/netipsec/xform_ah.c
510
if (alloc)
sys/netipsec/xform_ah.c
517
if (alloc) {
sys/sys/_unrhdr.h
43
u_int alloc; /* Count of memory allocations */
sys/sys/bus_san.h
137
#define bus_space_alloc BUS_SAN(alloc)
sys/sys/pmckern.h
101
#define PMC_SOFT_DEFINE_EX(prov, mod, func, name, alloc, release) \
sys/sys/pmckern.h
103
{ 0, alloc, release, { #prov "_" #mod "_" #func "." #name, 0 } }; \
sys/sys/vnode.h
828
int vn_vget_ino_gen(struct vnode *vp, vn_get_ino_t alloc,
sys/vm/uma_core.c
1246
size_t alloc;
sys/vm/uma_core.c
1251
alloc = sizeof(hash->uh_slab_hash[0]) * hash->uh_hashsize;
sys/vm/uma_core.c
1252
hash->uh_slab_hash = malloc(alloc, M_UMAHASH, M_NOWAIT);
sys/vm/uma_core.c
1254
alloc = sizeof(hash->uh_slab_hash[0]) * UMA_HASH_SIZE_INIT;
sys/vm/uma_core.c
1260
bzero(hash->uh_slab_hash, alloc);
sys/vm/vm_pager.c
420
FIX(alloc);
sys/vm/vm_phys.c
1118
goto alloc;
sys/vm/vm_phys.c
1137
goto alloc;
sys/vm/vm_phys.c
1145
alloc:
usr.bin/locale/locale.c
794
kwval_lookup(const char *kwname, char **kwval, int *cat, int *type, int *alloc)
usr.bin/locale/locale.c
801
*alloc = 0;
usr.bin/locale/locale.c
825
*alloc = 1;
usr.bin/locale/locale.c
842
int type, cat, tmpval, alloc;
usr.bin/locale/locale.c
845
if (kwval_lookup(kw, &kwval, &cat, &type, &alloc) == 0) {
usr.bin/locale/locale.c
886
if (alloc)
usr.bin/mdo/mdo.c
101
alloc_is_empty(const struct alloc *const alloc)
usr.bin/mdo/mdo.c
103
if (alloc->size == 0) {
usr.bin/mdo/mdo.c
104
assert(alloc->start == NULL);
usr.bin/mdo/mdo.c
107
assert(alloc->start != NULL);
usr.bin/mdo/mdo.c
113
alloc_realloc(struct alloc *const alloc)
usr.bin/mdo/mdo.c
115
const size_t old_size = alloc->size;
usr.bin/mdo/mdo.c
119
assert(alloc->start == NULL);
usr.bin/mdo/mdo.c
130
alloc->start = realloc(alloc->start, new_size);
usr.bin/mdo/mdo.c
131
if (alloc->start == NULL)
usr.bin/mdo/mdo.c
135
alloc->size = new_size;
usr.bin/mdo/mdo.c
139
alloc_free(struct alloc *const alloc)
usr.bin/mdo/mdo.c
141
if (!alloc_is_empty(alloc)) {
usr.bin/mdo/mdo.c
142
free(alloc->start);
usr.bin/mdo/mdo.c
143
*alloc = ALLOC_INITIALIZER;
usr.bin/mdo/mdo.c
148
int (*func)(void *data, const struct alloc *alloc);
usr.bin/mdo/mdo.c
161
alloc_wrap(struct alloc_wrap_data *const data, struct alloc *alloc)
usr.bin/mdo/mdo.c
166
if (alloc_is_empty(alloc))
usr.bin/mdo/mdo.c
167
alloc_realloc(alloc);
usr.bin/mdo/mdo.c
170
error = data->func(data, alloc);
usr.bin/mdo/mdo.c
173
alloc_realloc(alloc);
usr.bin/mdo/mdo.c
186
wrapped_getpwnam_r(void *data, const struct alloc *alloc)
usr.bin/mdo/mdo.c
188
struct passwd *const pwd = alloc->start;
usr.bin/mdo/mdo.c
193
assert(alloc->size >= sizeof(*pwd));
usr.bin/mdo/mdo.c
196
alloc->size - sizeof(*pwd), &result);
usr.bin/mdo/mdo.c
218
struct alloc *const alloc)
usr.bin/mdo/mdo.c
225
return (alloc_wrap((struct alloc_wrap_data *)&data, alloc));
usr.bin/mdo/mdo.c
235
wrapped_getgrnam_r(void *data, const struct alloc *alloc)
usr.bin/mdo/mdo.c
237
struct group *grp = alloc->start;
usr.bin/mdo/mdo.c
242
assert(alloc->size >= sizeof(*grp));
usr.bin/mdo/mdo.c
245
alloc->size - sizeof(*grp), &result);
usr.bin/mdo/mdo.c
267
struct alloc *const alloc)
usr.bin/mdo/mdo.c
274
return (alloc_wrap((struct alloc_wrap_data *)&data, alloc));
usr.bin/mdo/mdo.c
288
parse_user_pwd(const char *s, struct passwd **pwdp, struct alloc *allocp)
usr.bin/mdo/mdo.c
291
struct alloc alloc = ALLOC_INITIALIZER;
usr.bin/mdo/mdo.c
301
allocp = &alloc;
usr.bin/mdo/mdo.c
317
if (allocp == &alloc)
usr.bin/mdo/mdo.c
339
struct alloc alloc = ALLOC_INITIALIZER;
usr.bin/mdo/mdo.c
344
error = alloc_getgrnam(s, &grp, &alloc);
usr.bin/mdo/mdo.c
356
alloc_free(&alloc);
usr.bin/mdo/mdo.c
505
struct alloc pw_alloc = ALLOC_INITIALIZER;
usr.bin/mdo/mdo.c
71
static const struct alloc ALLOC_INITIALIZER = {
usr.sbin/acpi/acpidump/acpi.c
1105
ACPI_MCFG_ALLOCATION *alloc;
usr.sbin/acpi/acpidump/acpi.c
1113
alloc = (ACPI_MCFG_ALLOCATION *)(mcfg + 1);
usr.sbin/acpi/acpidump/acpi.c
1114
for (i = 0; i < entries; i++, alloc++) {
usr.sbin/acpi/acpidump/acpi.c
1116
printf("\tBase Address=0x%016jx\n", (uintmax_t)alloc->Address);
usr.sbin/acpi/acpidump/acpi.c
1117
printf("\tSegment Group=0x%04x\n", alloc->PciSegment);
usr.sbin/acpi/acpidump/acpi.c
1118
printf("\tStart Bus=%d\n", alloc->StartBusNumber);
usr.sbin/acpi/acpidump/acpi.c
1119
printf("\tEnd Bus=%d\n", alloc->EndBusNumber);
usr.sbin/bhyve/qemu_loader.c
205
printf(" name : %s\n\r", entry->alloc.name);
usr.sbin/bhyve/qemu_loader.c
207
le32toh(entry->alloc.alignment_le));
usr.sbin/bhyve/qemu_loader.c
209
qemu_loader_get_zone_name(entry->alloc.zone));
usr.sbin/bhyve/qemu_loader.c
32
} alloc;
usr.sbin/bhyve/qemu_loader.c
91
strncpy(element->entry.alloc.name, name, QEMU_FWCFG_MAX_NAME);
usr.sbin/bhyve/qemu_loader.c
92
element->entry.alloc.alignment_le = htole32(alignment);
usr.sbin/bhyve/qemu_loader.c
93
element->entry.alloc.zone = zone;
usr.sbin/makefs/zfs/vdev.c
342
uint64_t alloc, length, *smblk;
usr.sbin/makefs/zfs/vdev.c
355
alloc = length = 0;
usr.sbin/makefs/zfs/vdev.c
386
alloc += runlen << zfs->ashift;
usr.sbin/makefs/zfs/vdev.c
392
sm->smp_alloc = alloc;
usr.sbin/ppp/ccp.c
351
int alloc;
usr.sbin/ppp/ccp.c
355
alloc = ccp->his_reject == 0 && ccp->out.opt == NULL;
usr.sbin/ppp/ccp.c
363
if (!alloc)
usr.sbin/ppp/ccp.c
368
if (alloc || *o == NULL) {
usr.sbin/ppp/ccp.c
391
if (alloc)