ARGOBOTS  1.1
Macros | Enumerations | Functions
abti_mem.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ABTI_MEM_POOL_DESC_ELEM_SIZE   ABTU_roundup_size(sizeof(ABTI_thread), ABT_CONFIG_STATIC_CACHELINE_SIZE)
 
#define ABTI_STACK_CANARY_VALUE   ((uint64_t)0xbaadc0debaadc0de)
 
#define ABTI_MEM_POOL_DESC_SIZE   (ABTI_MEM_POOL_DESC_ELEM_SIZE - 4)
 

Enumerations

enum  {
  ABTI_MEM_LP_MALLOC = 0, ABTI_MEM_LP_MMAP_RP, ABTI_MEM_LP_MMAP_HP_RP, ABTI_MEM_LP_MMAP_HP_THP,
  ABTI_MEM_LP_THP
}
 

Functions

ABTU_ret_err int ABTI_mem_init (ABTI_global *p_global)
 
ABTU_ret_err int ABTI_mem_init_local (ABTI_global *p_global, ABTI_xstream *p_local_xstream)
 
void ABTI_mem_finalize (ABTI_global *p_global)
 
void ABTI_mem_finalize_local (ABTI_xstream *p_local_xstream)
 
int ABTI_mem_check_lp_alloc (ABTI_global *p_global, int lp_alloc)
 
static void ABTI_mem_register_stack (void *p_stack, size_t stacksize)
 
static void ABTI_mem_unregister_stack (void *p_stack)
 
static ABTU_ret_err int ABTI_mem_alloc_nythread_malloc (ABTI_thread **pp_thread)
 
static ABTU_ret_err int ABTI_mem_alloc_nythread (ABTI_local *p_local, ABTI_thread **pp_thread)
 
static void ABTI_mem_free_nythread (ABTI_global *p_global, ABTI_local *p_local, ABTI_thread *p_thread)
 
static ABTU_ret_err int ABTI_mem_alloc_ythread_malloc_desc_stack_impl (size_t stacksize, ABTI_ythread **pp_ythread, void **pp_stack)
 
static ABTU_ret_err int ABTI_mem_alloc_ythread_default (ABTI_global *p_global, ABTI_local *p_local, ABTI_ythread **pp_ythread)
 
static ABTU_ret_err int ABTI_mem_alloc_ythread_malloc_desc_stack (ABTI_thread_attr *p_attr, ABTI_ythread **pp_ythread)
 
static ABTU_ret_err int ABTI_mem_alloc_ythread_mempool_desc (ABTI_local *p_local, ABTI_thread_attr *p_attr, ABTI_ythread **pp_ythread)
 
static void ABTI_mem_free_thread (ABTI_global *p_global, ABTI_local *p_local, ABTI_thread *p_thread)
 
static ABTU_ret_err int ABTI_mem_alloc_desc (ABTI_local *p_local, void **pp_desc)
 
static void ABTI_mem_free_desc (ABTI_global *p_global, ABTI_local *p_local, void *p_desc)
 

Macro Definition Documentation

◆ ABTI_MEM_POOL_DESC_ELEM_SIZE

#define ABTI_MEM_POOL_DESC_ELEM_SIZE   ABTU_roundup_size(sizeof(ABTI_thread), ABT_CONFIG_STATIC_CACHELINE_SIZE)

Definition at line 14 of file abti_mem.h.

◆ ABTI_MEM_POOL_DESC_SIZE

#define ABTI_MEM_POOL_DESC_SIZE   (ABTI_MEM_POOL_DESC_ELEM_SIZE - 4)

Definition at line 328 of file abti_mem.h.

◆ ABTI_STACK_CANARY_VALUE

#define ABTI_STACK_CANARY_VALUE   ((uint64_t)0xbaadc0debaadc0de)

Definition at line 32 of file abti_mem.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ABTI_MEM_LP_MALLOC 
ABTI_MEM_LP_MMAP_RP 
ABTI_MEM_LP_MMAP_HP_RP 
ABTI_MEM_LP_MMAP_HP_THP 
ABTI_MEM_LP_THP 

Definition at line 17 of file abti_mem.h.

Function Documentation

◆ ABTI_mem_alloc_desc()

static ABTU_ret_err int ABTI_mem_alloc_desc ( ABTI_local p_local,
void **  pp_desc 
)
inlinestatic

Definition at line 330 of file abti_mem.h.

Referenced by ABTI_ktable_alloc_elem(), and ABTI_ktable_create().

◆ ABTI_mem_alloc_nythread()

static ABTU_ret_err int ABTI_mem_alloc_nythread ( ABTI_local p_local,
ABTI_thread **  pp_thread 
)
inlinestatic

Definition at line 98 of file abti_mem.h.

Referenced by ABTI_mem_alloc_ythread_mempool_desc(), and task_create().

◆ ABTI_mem_alloc_nythread_malloc()

static ABTU_ret_err int ABTI_mem_alloc_nythread_malloc ( ABTI_thread **  pp_thread)
inlinestatic

Definition at line 67 of file abti_mem.h.

Referenced by ABTI_mem_alloc_nythread().

◆ ABTI_mem_alloc_ythread_default()

static ABTU_ret_err int ABTI_mem_alloc_ythread_default ( ABTI_global p_global,
ABTI_local p_local,
ABTI_ythread **  pp_ythread 
)
inlinestatic

Definition at line 168 of file abti_mem.h.

Referenced by ythread_create().

◆ ABTI_mem_alloc_ythread_malloc_desc_stack()

static ABTU_ret_err int ABTI_mem_alloc_ythread_malloc_desc_stack ( ABTI_thread_attr p_attr,
ABTI_ythread **  pp_ythread 
)
inlinestatic

Definition at line 236 of file abti_mem.h.

Referenced by ythread_create().

◆ ABTI_mem_alloc_ythread_malloc_desc_stack_impl()

static ABTU_ret_err int ABTI_mem_alloc_ythread_malloc_desc_stack_impl ( size_t  stacksize,
ABTI_ythread **  pp_ythread,
void **  pp_stack 
)
inlinestatic

◆ ABTI_mem_alloc_ythread_mempool_desc()

static ABTU_ret_err int ABTI_mem_alloc_ythread_mempool_desc ( ABTI_local p_local,
ABTI_thread_attr p_attr,
ABTI_ythread **  pp_ythread 
)
inlinestatic

Definition at line 256 of file abti_mem.h.

Referenced by ythread_create().

◆ ABTI_mem_check_lp_alloc()

int ABTI_mem_check_lp_alloc ( ABTI_global p_global,
int  lp_alloc 
)

Referenced by ABTD_env_init().

◆ ABTI_mem_finalize()

void ABTI_mem_finalize ( ABTI_global p_global)

Definition at line 192 of file malloc.c.

Referenced by finailze_library(), and init_library().

◆ ABTI_mem_finalize_local()

void ABTI_mem_finalize_local ( ABTI_xstream p_local_xstream)

Definition at line 196 of file malloc.c.

Referenced by xstream_create().

◆ ABTI_mem_free_desc()

static void ABTI_mem_free_desc ( ABTI_global p_global,
ABTI_local p_local,
void *  p_desc 
)
inlinestatic

Definition at line 358 of file abti_mem.h.

Referenced by ABTI_ktable_free().

◆ ABTI_mem_free_nythread()

static void ABTI_mem_free_nythread ( ABTI_global p_global,
ABTI_local p_local,
ABTI_thread p_thread 
)
inlinestatic

Definition at line 108 of file abti_mem.h.

Referenced by ABTI_mem_free_thread(), and task_create().

◆ ABTI_mem_free_thread()

static void ABTI_mem_free_thread ( ABTI_global p_global,
ABTI_local p_local,
ABTI_thread p_thread 
)
inlinestatic

Definition at line 281 of file abti_mem.h.

Referenced by thread_free(), and ythread_create().

◆ ABTI_mem_init()

ABTU_ret_err int ABTI_mem_init ( ABTI_global p_global)

Definition at line 181 of file malloc.c.

Referenced by init_library().

◆ ABTI_mem_init_local()

ABTU_ret_err int ABTI_mem_init_local ( ABTI_global p_global,
ABTI_xstream p_local_xstream 
)

Definition at line 186 of file malloc.c.

Referenced by xstream_create().

◆ ABTI_mem_register_stack()

static void ABTI_mem_register_stack ( void *  p_stack,
size_t  stacksize 
)
inlinestatic

◆ ABTI_mem_unregister_stack()

static void ABTI_mem_unregister_stack ( void *  p_stack)
inlinestatic

Definition at line 51 of file abti_mem.h.

Referenced by ABTI_mem_free_thread().