memory.h
Include dependency graph for memory.h:
This graph shows which files directly or indirectly include memory.h:
Defines
-
HEAP_NEED_GC_SHRINK_THRESHOLD_COEFF
-
MIN_FREE_SPACE_SIZE
-
TYPEDEF_CONTEXT
-
TYPEDEF_GLOBALCONTEXT
-
TYPEDEF_HEAP
-
BEGIN_WITH_STACK_HEAP(size, name)
-
END_WITH_STACK_HEAP(name, global)
-
STORAGE_MSO_LIST_INDEX
-
STORAGE_HEAP_START_INDEX
Typedefs
-
typedef struct Context Context
-
typedef struct GlobalContext GlobalContext
-
typedef struct HeapFragment HeapFragment
-
typedef struct Heap Heap
Enums
-
enum MemoryGCResult
Values:
-
enumerator MEMORY_GC_OK
-
enumerator MEMORY_GC_ERROR_FAILED_ALLOCATION
-
enumerator MEMORY_GC_DENIED_ALLOCATION
-
enumerator MEMORY_GC_OK
-
enum MemoryAllocMode
Values:
-
enumerator MEMORY_NO_SHRINK
-
enumerator MEMORY_CAN_SHRINK
-
enumerator MEMORY_FORCE_SHRINK
-
enumerator MEMORY_NO_GC
-
enumerator MEMORY_NO_SHRINK
Functions
-
void memory_init_heap_root_fragment(Heap *heap, HeapFragment *root, size_t size)
- enum MemoryGCResult memory_init_heap (Heap *heap, size_t size) MUST_CHECK
-
static inline size_t memory_heap_fragment_memory_size(const HeapFragment *fragment)
- static inline MALLOC_LIKE term * memory_heap_alloc (Heap *heap, size_t size)
- enum MemoryGCResult memory_ensure_free_with_roots (Context *ctx, size_t size, size_t num_roots, term *roots, enum MemoryAllocMode alloc_mode) MUST_CHECK
- static inline MUST_CHECK enum MemoryGCResult memory_ensure_free_opt (Context *ctx, size_t size, enum MemoryAllocMode alloc_mode)
- static inline MUST_CHECK enum MemoryGCResult memory_ensure_free (Context *ctx, size_t size)
- MUST_CHECK enum MemoryGCResult memory_erl_nif_env_ensure_free (ErlNifEnv *env, size_t size)
-
unsigned long memory_estimate_usage(term t)
-
void memory_heap_append_fragment(Heap *heap, HeapFragment *fragment, term mso_list)
-
void memory_sweep_mso_list(term mso_list, GlobalContext *global)
-
static inline void memory_destroy_heap_fragment(HeapFragment *fragment)
-
static inline void memory_destroy_heap(Heap *heap, GlobalContext *global)
-
struct HeapFragment
Collaboration diagram for HeapFragment:
Public Members
-
HeapFragment *next
-
term mso_list
-
term *heap_end
-
union HeapFragment::[anonymous] [anonymous]
-
term storage[]
-
HeapFragment *next
-
struct Heap
Collaboration diagram for Heap: