ARGOBOTS  4dc37e16e1b227a480715ab67dae1dcfb4d2d4e0
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_ythread), 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_write_stack_canary (void *p_stack)
 
static void ABTI_mem_check_stack_canary (void *p_stack)
 
static void ABTI_mem_register_stack (const ABTI_global *p_global, void *p_stacktop, size_t stacksize, ABT_bool mprotect_if_needed)
 
static void ABTI_mem_unregister_stack (const ABTI_global *p_global, void *p_stacktop, size_t stacksize, ABT_bool mprotect_if_needed)
 
static ABTU_ret_err int ABTI_mem_alloc_nythread (ABTI_local *p_local, ABTI_thread **pp_thread)
 
static void ABTI_mem_free_nythread_mempool_impl (ABTI_global *p_global, ABTI_local *p_local, ABTI_thread *p_thread)
 
static ABTU_ret_err int ABTI_mem_alloc_ythread_desc_impl (ABTI_local *p_local, ABT_bool use_lazy_stack, ABTI_ythread **pp_ythread)
 
static void ABTI_mem_free_ythread_desc_mempool_impl (ABTI_global *p_global, ABTI_local *p_local, ABTI_ythread *p_ythread)
 
static ABTU_ret_err int ABTI_mem_alloc_ythread_malloc_desc_stack_impl (size_t stacksize, ABTI_ythread **pp_ythread, void **pp_stacktop)
 
static ABTU_ret_err int ABTI_mem_alloc_ythread_mempool_desc_stack (ABTI_global *p_global, ABTI_local *p_local, size_t stacksize, ABTI_ythread **pp_ythread)
 
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_global *p_global, size_t stacksize, ABTI_ythread **pp_ythread)
 
static ABTU_ret_err int ABTI_mem_alloc_ythread_mempool_desc (ABTI_global *p_global, ABTI_local *p_local, size_t stacksize, void *p_stacktop, 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_ythread_mempool_stack (ABTI_xstream *p_local_xstream, ABTI_ythread *p_ythread)
 
static void ABTI_mem_free_ythread_mempool_stack (ABTI_xstream *p_local_xstream, ABTI_ythread *p_ythread)
 
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_ythread), 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 501 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 503 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 130 of file abti_mem.h.

Referenced by ABTI_mem_alloc_ythread_mempool_desc(), and task_create().

◆ 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 336 of file abti_mem.h.

Referenced by ythread_create().

◆ ABTI_mem_alloc_ythread_desc_impl()

static ABTU_ret_err int ABTI_mem_alloc_ythread_desc_impl ( ABTI_local p_local,
ABT_bool  use_lazy_stack,
ABTI_ythread **  pp_ythread 
)
inlinestatic

Definition at line 183 of file abti_mem.h.

Referenced by ABTI_mem_alloc_ythread_mempool_desc_stack().

◆ ABTI_mem_alloc_ythread_malloc_desc_stack()

static ABTU_ret_err int ABTI_mem_alloc_ythread_malloc_desc_stack ( ABTI_global p_global,
size_t  stacksize,
ABTI_ythread **  pp_ythread 
)
inlinestatic

Definition at line 344 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_stacktop 
)
inlinestatic

◆ ABTI_mem_alloc_ythread_mempool_desc()

static ABTU_ret_err int ABTI_mem_alloc_ythread_mempool_desc ( ABTI_global p_global,
ABTI_local p_local,
size_t  stacksize,
void *  p_stacktop,
ABTI_ythread **  pp_ythread 
)
inlinestatic

Definition at line 363 of file abti_mem.h.

Referenced by ythread_create().

◆ ABTI_mem_alloc_ythread_mempool_desc_stack()

static ABTU_ret_err int ABTI_mem_alloc_ythread_mempool_desc_stack ( ABTI_global p_global,
ABTI_local p_local,
size_t  stacksize,
ABTI_ythread **  pp_ythread 
)
inlinestatic

Definition at line 273 of file abti_mem.h.

Referenced by ABTI_mem_alloc_ythread_default(), and ythread_create().

◆ ABTI_mem_alloc_ythread_mempool_stack()

static ABTU_ret_err int ABTI_mem_alloc_ythread_mempool_stack ( ABTI_xstream p_local_xstream,
ABTI_ythread p_ythread 
)
inlinestatic

◆ 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_check_stack_canary()

static void ABTI_mem_check_stack_canary ( void *  p_stack)
inlinestatic

Definition at line 46 of file abti_mem.h.

Referenced by ABTI_mem_unregister_stack().

◆ ABTI_mem_finalize()

void ABTI_mem_finalize ( ABTI_global p_global)

Definition at line 206 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 210 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 531 of file abti_mem.h.

Referenced by ABTI_ktable_free().

◆ ABTI_mem_free_nythread_mempool_impl()

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

Definition at line 155 of file abti_mem.h.

Referenced by ABTI_mem_free_thread().

◆ 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 382 of file abti_mem.h.

Referenced by task_create(), thread_free(), and ythread_create().

◆ ABTI_mem_free_ythread_desc_mempool_impl()

static void ABTI_mem_free_ythread_desc_mempool_impl ( ABTI_global p_global,
ABTI_local p_local,
ABTI_ythread p_ythread 
)
inlinestatic

Definition at line 213 of file abti_mem.h.

Referenced by ABTI_mem_free_thread().

◆ ABTI_mem_free_ythread_mempool_stack()

static void ABTI_mem_free_ythread_mempool_stack ( ABTI_xstream p_local_xstream,
ABTI_ythread p_ythread 
)
inlinestatic

Definition at line 482 of file abti_mem.h.

◆ ABTI_mem_init()

ABTU_ret_err int ABTI_mem_init ( ABTI_global p_global)

Definition at line 195 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 200 of file malloc.c.

Referenced by xstream_create().

◆ ABTI_mem_register_stack()

static void ABTI_mem_register_stack ( const ABTI_global p_global,
void *  p_stacktop,
size_t  stacksize,
ABT_bool  mprotect_if_needed 
)
inlinestatic

◆ ABTI_mem_unregister_stack()

static void ABTI_mem_unregister_stack ( const ABTI_global p_global,
void *  p_stacktop,
size_t  stacksize,
ABT_bool  mprotect_if_needed 
)
inlinestatic

Definition at line 94 of file abti_mem.h.

Referenced by ABTI_mem_free_thread().

◆ ABTI_mem_write_stack_canary()

static void ABTI_mem_write_stack_canary ( void *  p_stack)
inlinestatic

Definition at line 36 of file abti_mem.h.

Referenced by ABTI_mem_register_stack().