2004-06-16 19:41:29 +04:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*/
|
|
|
|
#ifndef MCA_MPOOL_SM_H
|
|
|
|
#define MCA_MPOOL_SM_H
|
|
|
|
|
|
|
|
#include "class/ompi_list.h"
|
|
|
|
#include "class/ompi_free_list.h"
|
|
|
|
#include "event/event.h"
|
|
|
|
#include "mca/mpool/mpool.h"
|
|
|
|
#include "mca/allocator/allocator.h"
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2004-06-16 19:41:29 +04:00
|
|
|
|
|
|
|
struct mca_mpool_sm_component_t {
|
|
|
|
mca_mpool_base_component_t super;
|
2004-08-02 04:24:22 +04:00
|
|
|
mca_allocator_base_module_t* sm_allocator;
|
2004-06-16 19:41:29 +04:00
|
|
|
char* sm_allocator_name;
|
|
|
|
size_t sm_size;
|
2004-06-17 00:01:19 +04:00
|
|
|
struct mca_mpool_sm_mmap_t *sm_mmap;
|
2004-06-16 19:41:29 +04:00
|
|
|
};
|
|
|
|
typedef struct mca_mpool_sm_component_t mca_mpool_sm_component_t;
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_COMP_EXPORT extern mca_mpool_sm_component_t mca_mpool_sm_component;
|
|
|
|
OMPI_COMP_EXPORT extern mca_mpool_base_module_t mca_mpool_sm_module;
|
2004-06-18 00:33:52 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Returns base address of shared memory mapping.
|
|
|
|
*/
|
|
|
|
void* mca_mpool_sm_base(void);
|
|
|
|
|
2004-06-16 19:41:29 +04:00
|
|
|
/**
|
2004-06-18 00:33:52 +04:00
|
|
|
* Allocate block of shared memory.
|
2004-06-16 19:41:29 +04:00
|
|
|
*/
|
|
|
|
void* mca_mpool_sm_alloc(size_t size, size_t align);
|
2004-08-02 04:24:22 +04:00
|
|
|
|
2004-06-16 19:41:29 +04:00
|
|
|
/**
|
|
|
|
* realloc function typedef
|
|
|
|
*/
|
|
|
|
void* mca_mpool_sm_realloc(void* addr, size_t size);
|
2004-08-02 04:24:22 +04:00
|
|
|
|
2004-06-16 19:41:29 +04:00
|
|
|
/**
|
|
|
|
* free function typedef
|
|
|
|
*/
|
|
|
|
void mca_mpool_sm_free(void *);
|
2004-08-02 04:24:22 +04:00
|
|
|
|
2004-06-16 19:41:29 +04:00
|
|
|
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2004-06-16 19:41:29 +04:00
|
|
|
|
|
|
|
#endif
|