Lines Matching refs:malloc_ctx

134 struct malloc_ctx {  struct
148 static uint32_t malloc_lock(struct malloc_ctx *ctx) in malloc_lock() argument
153 static void malloc_unlock(struct malloc_ctx *ctx, uint32_t exceptions) in malloc_unlock()
160 static uint32_t malloc_lock(struct malloc_ctx *ctx __unused) in malloc_lock()
165 static void malloc_unlock(struct malloc_ctx *ctx __unused, in malloc_unlock()
172 #define DEFINE_CTX(name) struct malloc_ctx name = \
177 static DEFINE_CTX(malloc_ctx);
285 struct malloc_ctx *ctx) in raw_malloc_return_hook()
303 static void gen_malloc_reset_stats(struct malloc_ctx *ctx) in gen_malloc_reset_stats()
316 gen_malloc_reset_stats(&malloc_ctx); in malloc_reset_stats()
319 static void gen_malloc_get_stats(struct malloc_ctx *ctx, in gen_malloc_get_stats()
330 gen_malloc_get_stats(&malloc_ctx, stats); in malloc_get_stats()
337 struct malloc_ctx *ctx ) in raw_malloc_return_hook()
348 static void raw_malloc_validate_pools(struct malloc_ctx *ctx) in raw_malloc_validate_pools()
356 static void raw_malloc_validate_pools(struct malloc_ctx *ctx __unused) in raw_malloc_validate_pools()
366 static void bpool_foreach_iterator_init(struct malloc_ctx *ctx, in bpool_foreach_iterator_init()
403 static bool bpool_foreach(struct malloc_ctx *ctx, in bpool_foreach()
431 size_t pl_size, struct malloc_ctx *ctx) in raw_malloc_flags()
477 size_t pl_size, struct malloc_ctx *ctx) in raw_memalign()
484 struct malloc_ctx *ctx) in raw_malloc()
490 void raw_free(void *ptr, struct malloc_ctx *ctx, bool wipe) in raw_free()
499 size_t pl_size, struct malloc_ctx *ctx) in raw_calloc()
506 size_t pl_size, struct malloc_ctx *ctx) in raw_realloc()
564 int lineno, struct malloc_ctx *ctx) in mem_alloc_unlocked()
599 static struct malloc_ctx *get_ctx(uint32_t flags __maybe_unused) in get_ctx()
605 return &malloc_ctx; in get_ctx()
611 struct malloc_ctx *ctx = get_ctx(flags); in mem_alloc()
625 struct malloc_ctx *ctx = get_ctx(flags); in free_flags()
671 static void gen_mdbg_check(struct malloc_ctx *ctx, int bufdump) in gen_mdbg_check()
700 gen_mdbg_check(&malloc_ctx, bufdump); in mdbg_check()
765 static void gen_malloc_add_pool(struct malloc_ctx *ctx, void *buf, size_t len) in gen_malloc_add_pool()
773 static bool gen_malloc_buffer_is_within_alloced(struct malloc_ctx *ctx, in gen_malloc_buffer_is_within_alloced()
785 static bool gen_malloc_buffer_overlaps_heap(struct malloc_ctx *ctx, in gen_malloc_buffer_overlaps_heap()
798 return sizeof(struct malloc_ctx); in raw_malloc_get_ctx_size()
801 void raw_malloc_init_ctx(struct malloc_ctx *ctx) in raw_malloc_init_ctx()
808 void raw_malloc_add_pool(struct malloc_ctx *ctx, void *buf, size_t len) in raw_malloc_add_pool()
844 bool raw_malloc_buffer_overlaps_heap(struct malloc_ctx *ctx, in raw_malloc_buffer_overlaps_heap()
868 bool raw_malloc_buffer_is_within_alloced(struct malloc_ctx *ctx, in raw_malloc_buffer_is_within_alloced()
897 void raw_malloc_get_stats(struct malloc_ctx *ctx, struct pta_stats_alloc *stats) in raw_malloc_get_stats()
907 gen_malloc_add_pool(&malloc_ctx, buf, len); in malloc_add_pool()
912 return gen_malloc_buffer_is_within_alloced(&malloc_ctx, buf, len); in malloc_buffer_is_within_alloced()
917 return gen_malloc_buffer_overlaps_heap(&malloc_ctx, buf, len); in malloc_buffer_overlaps_heap()