23 #ifndef ALLOCATOR_BUCKET_ALLOC_H
24 #define ALLOCATOR_BUCKET_ALLOC_H
26 #include "ompi_config.h"
int num_buckets
the number of buckets
Definition: allocator_bucket_alloc.h:92
int mca_allocator_bucket_cleanup(mca_allocator_base_module_t *mem)
Frees all the memory from all the buckets back to the system.
Definition: allocator_bucket_alloc.c:298
mca_allocator_bucket_t * mca_allocator_bucket_init(mca_allocator_base_module_t *mem, int num_buckets, mca_allocator_base_component_segment_alloc_fn_t get_mem_funct, mca_allocator_base_component_segment_free_fn_t free_mem_funct)
Initializes the mca_allocator_bucket_options_t data structure for the passed parameters.
Definition: allocator_bucket_alloc.c:38
mca_allocator_base_module_t super
makes this a child of class mca_allocator_t
Definition: allocator_bucket_alloc.h:90
mca_allocator_base_component_segment_free_fn_t free_mem_fn
pointer to the function to free memory
Definition: allocator_bucket_alloc.h:95
Definition: mutex_unix.h:53
Structure that heads each segment.
Definition: allocator_bucket_alloc.h:63
mca_allocator_bucket_bucket_t * buckets
the array of buckets
Definition: allocator_bucket_alloc.h:91
mca_allocator_base_component_segment_alloc_fn_t get_mem_fn
pointer to the function to get more memory
Definition: allocator_bucket_alloc.h:93
int mca_allocator_bucket_finalize(mca_allocator_base_module_t *mem)
Cleanup all resources held by this allocator.
Definition: allocator_bucket.c:47
void(* mca_allocator_base_component_segment_free_fn_t)(struct mca_mpool_base_module_t *module, void *segment)
A function to free memory from the control of the allocator framework back to the system...
Definition: allocator.h:113
Structure for each bucket.
Definition: allocator_bucket_alloc.h:76
struct mca_allocator_bucket_chunk_header_t * first_chunk
the first chunk of the header
Definition: allocator_bucket_alloc.h:64
void * mca_allocator_bucket_alloc(mca_allocator_base_module_t *mem, size_t size, mca_mpool_base_registration_t **registration)
Accepts a request for memory in a specific region defined by the mca_allocator_bucket_options_t struc...
Definition: allocator_bucket_alloc.c:74
void *(* mca_allocator_base_component_segment_alloc_fn_t)(struct mca_mpool_base_module_t *module, size_t *size, mca_mpool_base_registration_t **registration)
A function to get more memory from the system.
Definition: allocator.h:103
void * mca_allocator_bucket_alloc_align(mca_allocator_base_module_t *mem, size_t size, size_t alignment, mca_mpool_base_registration_t **registration)
Accepts a request for memory in a specific region defined by the mca_allocator_bucket_options_t struc...
Definition: allocator_bucket_alloc.c:156
mca_allocator_bucket_chunk_header_t * free_chunk
the first free chunk of memory
Definition: allocator_bucket_alloc.h:77
The data structure provided by each component to the framework which describes the component...
Definition: allocator.h:133
mca_allocator_bucket_segment_head_t * segment_head
the list of segment headers
Definition: allocator_bucket_alloc.h:79
struct mca_allocator_bucket_segment_head_t * next_segment
the next segment in the bucket
Definition: allocator_bucket_alloc.h:65
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana University Research and Techno...
void * mca_allocator_bucket_realloc(mca_allocator_base_module_t *mem, void *ptr, size_t size, mca_mpool_base_registration_t **registration)
Attempts to resize the passed region of memory into a larger or a smaller region. ...
Definition: allocator_bucket_alloc.c:239
void mca_allocator_bucket_free(mca_allocator_base_module_t *mem, void *ptr)
Frees the passed region of memory.
Definition: allocator_bucket_alloc.c:281
Structure that holds the necessary information for each area of memory.
Definition: allocator_bucket_alloc.h:89
opal_mutex_t lock
the lock on the bucket
Definition: allocator_bucket_alloc.h:78
Mutual exclusion functions.
The data structure for each component.
Definition: allocator.h:78