MT#55283 use lightweight alloc for slices

Change-Id: I63b0a7a96675a53905071931f3bab1fa89fd5d8d
master
Richard Fuchs 4 days ago
parent e74043145f
commit f74d428017

@ -5443,6 +5443,8 @@ void call_media_free(struct call_media *md) {
memory_arena_free_lw(md->media_id.s);
memory_arena_free_lw(md->label.s);
memory_arena_free_lw(md->tls_id.s);
memory_arena_free_lw(md);
}
void __monologue_free(struct call_monologue *m) {
@ -5455,6 +5457,8 @@ void __monologue_free(struct call_monologue *m) {
t_queue_clear_full(&m->all_attributes, sdp_attr_free);
t_queue_clear(&m->tag_aliases);
t_queue_clear(&m->groups_other);
memory_arena_free_lw(m);
}
static void __call_free(call_t *c) {
@ -5484,6 +5488,7 @@ static void __call_free(call_t *c) {
while (c->endpoint_maps.head) {
em = i_queue_pop_head(&c->endpoint_maps);
t_queue_clear_full(&em->intf_sfds, free_sfd_intf_list);
memory_arena_free_lw(em);
}
t_hash_table_destroy(c->tags);
@ -5500,6 +5505,7 @@ static void __call_free(call_t *c) {
t_hash_table_destroy(ps->rtp_stats);
bufferpool_unref(ps->stats_in);
bufferpool_unref(ps->stats_out);
memory_arena_free_lw(ps);
}
memory_arena = NULL;

@ -258,14 +258,14 @@ void thread_create_looper(enum thread_looper_action (*f)(void), const char *sche
/*** ALLOC WITH UNIQUE ID HELPERS ***/
#define uid_alloc(q) ({ \
__typeof__((q)->__t) __ret = memory_arena_alloc0(__typeof__(*(q)->__t)); \
__typeof__((q)->__t) __ret = memory_arena_alloc0_lw(__typeof__(*(q)->__t)); \
__ret->unique_id = (q)->length; \
t_queue_push_tail(q, __ret); \
__ret; \
})
#define iuid_alloc(q) ({ \
__typeof__((q)->head) __ret = memory_arena_alloc0(__typeof__(*(q)->head)); \
__typeof__((q)->head) __ret = memory_arena_alloc0_lw(__typeof__(*(q)->head)); \
__ret->unique_id = (q)->length; \
i_queue_push_tail(q, __ret); \
__ret; \

Loading…
Cancel
Save