ARGOBOTS  1059a7c2eb7e3f99f736a9c3a4f6ea476ac1b804
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Macros | Typedefs | Enumerations | Functions
abtu.h File Reference
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "abt_config.h"
Include dependency graph for abtu.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ABTU_likely(cond)   __builtin_expect(!!(cond), 1)
 
#define ABTU_unlikely(cond)   __builtin_expect(!!(cond), 0)
 
#define ABTU_unreachable()   __builtin_unreachable()
 
#define ABTU_noreturn   __attribute__((noreturn))
 
#define ABTU_alignof(type)   (__alignof__(type))
 
#define ABTU_MAX_ALIGNMENT
 
#define ABTU_ret_err   __attribute__((warn_unused_result))
 
#define ABTU_align_member_var(size)   __attribute__((aligned(size)))
 
#define ABTU_no_sanitize_address
 

Typedefs

typedef enum
ABTU_MEM_LARGEPAGE_TYPE 
ABTU_MEM_LARGEPAGE_TYPE
 

Enumerations

enum  ABTU_MEM_LARGEPAGE_TYPE { ABTU_MEM_LARGEPAGE_MALLOC, ABTU_MEM_LARGEPAGE_MEMALIGN, ABTU_MEM_LARGEPAGE_MMAP, ABTU_MEM_LARGEPAGE_MMAP_HUGEPAGE }
 

Functions

static ABTU_ret_err int ABTU_memalign (size_t alignment, size_t size, void **p_ptr)
 
static void ABTU_free (void *ptr)
 
static ABTU_ret_err int ABTU_malloc (size_t size, void **p_ptr)
 
static ABTU_ret_err int ABTU_calloc (size_t num, size_t size, void **p_ptr)
 
static ABTU_ret_err int ABTU_realloc (size_t old_size, size_t new_size, void **p_ptr)
 
int ABTU_is_supported_largepage_type (size_t size, size_t alignment_hint, ABTU_MEM_LARGEPAGE_TYPE requested)
 
ABTU_ret_err int ABTU_alloc_largepage (size_t size, size_t alignment_hint, const ABTU_MEM_LARGEPAGE_TYPE *requested_types, int num_requested_types, ABTU_MEM_LARGEPAGE_TYPE *p_actual, void **p_ptr)
 
void ABTU_free_largepage (void *ptr, size_t size, ABTU_MEM_LARGEPAGE_TYPE type)
 

Macro Definition Documentation

#define ABTU_align_member_var (   size)    __attribute__((aligned(size)))

Definition at line 64 of file abtu.h.

#define ABTU_alignof (   type)    (__alignof__(type))

Definition at line 37 of file abtu.h.

#define ABTU_likely (   cond)    __builtin_expect(!!(cond), 1)

Definition at line 17 of file abtu.h.

#define ABTU_MAX_ALIGNMENT
Value:
(ABTU_alignof(long double) > ABTU_alignof(long long) \
? ABTU_alignof(long double) \
: ABTU_alignof(long long))
#define ABTU_alignof(type)
Definition: abtu.h:37

Definition at line 43 of file abtu.h.

#define ABTU_no_sanitize_address

Definition at line 105 of file abtu.h.

#define ABTU_noreturn   __attribute__((noreturn))

Definition at line 31 of file abtu.h.

#define ABTU_ret_err   __attribute__((warn_unused_result))

Definition at line 49 of file abtu.h.

#define ABTU_unlikely (   cond)    __builtin_expect(!!(cond), 0)

Definition at line 18 of file abtu.h.

Referenced by ythread_create().

#define ABTU_unreachable ( )    __builtin_unreachable()

Typedef Documentation

Enumeration Type Documentation

Enumerator
ABTU_MEM_LARGEPAGE_MALLOC 
ABTU_MEM_LARGEPAGE_MEMALIGN 
ABTU_MEM_LARGEPAGE_MMAP 
ABTU_MEM_LARGEPAGE_MMAP_HUGEPAGE 

Definition at line 203 of file abtu.h.

Function Documentation

ABTU_ret_err int ABTU_alloc_largepage ( size_t  size,
size_t  alignment_hint,
const ABTU_MEM_LARGEPAGE_TYPE requested_types,
int  num_requested_types,
ABTU_MEM_LARGEPAGE_TYPE p_actual,
void **  p_ptr 
)

Definition at line 90 of file largepage.c.

static ABTU_ret_err int ABTU_calloc ( size_t  num,
size_t  size,
void **  p_ptr 
)
inlinestatic
static void ABTU_free ( void *  ptr)
inlinestatic
void ABTU_free_largepage ( void *  ptr,
size_t  size,
ABTU_MEM_LARGEPAGE_TYPE  type 
)

Definition at line 132 of file largepage.c.

int ABTU_is_supported_largepage_type ( size_t  size,
size_t  alignment_hint,
ABTU_MEM_LARGEPAGE_TYPE  requested 
)

Definition at line 59 of file largepage.c.

static ABTU_ret_err int ABTU_malloc ( size_t  size,
void **  p_ptr 
)
inlinestatic
static ABTU_ret_err int ABTU_memalign ( size_t  alignment,
size_t  size,
void **  p_ptr 
)
inlinestatic

Definition at line 110 of file abtu.h.

Referenced by ABTU_alloc_largepage(), ABTU_is_supported_largepage_type(), and ABTU_malloc().

static ABTU_ret_err int ABTU_realloc ( size_t  old_size,
size_t  new_size,
void **  p_ptr 
)
inlinestatic

Definition at line 152 of file abtu.h.

Referenced by ABT_sched_config_create(), id_list_add(), info_add_pool_set(), and list_add().