- Add $HEADER$
- Fix include file names This commit was SVN r41.
Этот коммит содержится в:
родитель
b22c2a5e10
Коммит
efa753d7b2
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $HEADER$
|
||||||
|
*
|
||||||
* Copyright 2002-2003. The Regents of the University of California. This material
|
* Copyright 2002-2003. The Regents of the University of California. This material
|
||||||
* was produced under U.S. Government contract W-7405-ENG-36 for Los Alamos
|
* was produced under U.S. Government contract W-7405-ENG-36 for Los Alamos
|
||||||
* National Laboratory, which is operated by the University of California for
|
* National Laboratory, which is operated by the University of California for
|
||||||
@ -28,10 +30,10 @@
|
|||||||
*/
|
*/
|
||||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||||
|
|
||||||
#ifndef ALLOCATOR_H
|
#ifndef LAM_ALLOCATOR_H
|
||||||
#define ALLOCATOR_H
|
#define LAM_ALLOCATOR_H
|
||||||
|
|
||||||
#include "lam/base/object.h"
|
#include "lam/lfc/object.h"
|
||||||
|
|
||||||
/* This class is used to provide a generic and flexible
|
/* This class is used to provide a generic and flexible
|
||||||
way for the mem pool to allocate memory. It's meant
|
way for the mem pool to allocate memory. It's meant
|
||||||
@ -84,5 +86,5 @@ static inline uint64_t lam_alc_get_pin_size(lam_allocator_t *allocator) {return
|
|||||||
static inline void lam_alc_set_pin_size(lam_allocator_t *allocator, uint64_t pin_sz)
|
static inline void lam_alc_set_pin_size(lam_allocator_t *allocator, uint64_t pin_sz)
|
||||||
{allocator->alc_pinned_sz = pin_sz;}
|
{allocator->alc_pinned_sz = pin_sz;}
|
||||||
|
|
||||||
#endif /* ALLOCATOR_H */
|
#endif /* LAM_ALLOCATOR_H */
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $HEADER$
|
||||||
|
*
|
||||||
* Copyright 2002-2003. The Regents of the University of California. This material
|
* Copyright 2002-2003. The Regents of the University of California. This material
|
||||||
* was produced under U.S. Government contract W-7405-ENG-36 for Los Alamos
|
* was produced under U.S. Government contract W-7405-ENG-36 for Los Alamos
|
||||||
* National Laboratory, which is operated by the University of California for
|
* National Laboratory, which is operated by the University of California for
|
||||||
@ -28,10 +30,10 @@
|
|||||||
*/
|
*/
|
||||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||||
|
|
||||||
#ifndef _FREE_LIST_
|
#ifndef LAM_FREE_LIST
|
||||||
#define _FREE_LIST_
|
#define LAM_FREE_LIST
|
||||||
|
|
||||||
#include "lam/base/list.h"
|
#include "lam/lfc/list.h"
|
||||||
#include "lam/threads/mutex.h"
|
#include "lam/threads/mutex.h"
|
||||||
#include "lam/mem/seg_list.h"
|
#include "lam/mem/seg_list.h"
|
||||||
#include "lam/mem/mem_pool.h"
|
#include "lam/mem/mem_pool.h"
|
||||||
@ -104,9 +106,9 @@ int lam_frl_init_with(lam_free_list_t *flist,
|
|||||||
int max_pages_per_list,
|
int max_pages_per_list,
|
||||||
int max_consec_req_fail,
|
int max_consec_req_fail,
|
||||||
const char *description,
|
const char *description,
|
||||||
bool_t retry_for_more_resources,
|
lam_bool_t retry_for_more_resources,
|
||||||
lam_affinity_t *affinity,
|
lam_affinity_t *affinity,
|
||||||
bool_t enforce_affinity,
|
lam_bool_t enforce_affinity,
|
||||||
lam_mem_pool_t *pool);
|
lam_mem_pool_t *pool);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $HEADER$
|
||||||
|
*
|
||||||
* Copyright 2002-2003. The Regents of the University of California. This material
|
* Copyright 2002-2003. The Regents of the University of California. This material
|
||||||
* was produced under U.S. Government contract W-7405-ENG-36 for Los Alamos
|
* was produced under U.S. Government contract W-7405-ENG-36 for Los Alamos
|
||||||
* National Laboratory, which is operated by the University of California for
|
* National Laboratory, which is operated by the University of California for
|
||||||
@ -27,12 +29,12 @@
|
|||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*/
|
*/
|
||||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||||
|
|
||||||
#ifndef _MEMORY_POOL_
|
|
||||||
#define _MEMORY_POOL_
|
|
||||||
|
|
||||||
#include "lam_types.h"
|
#ifndef LAM_MEMORY_POOL
|
||||||
#include "lam/base/object.h"
|
#define LAM_MEMORY_POOL
|
||||||
|
|
||||||
|
#include "include/lam_types.h"
|
||||||
|
#include "lam/lfc/object.h"
|
||||||
#include "lam/mem/allocator.h"
|
#include "lam/mem/allocator.h"
|
||||||
#include "lam/threads/mutex.h"
|
#include "lam/threads/mutex.h"
|
||||||
|
|
||||||
@ -41,7 +43,7 @@
|
|||||||
#define ALLOCELEMENT_FLAG_INUSE (2)
|
#define ALLOCELEMENT_FLAG_INUSE (2)
|
||||||
#define ALLOCELEMENT_FLAG_NEVERFREE (4)
|
#define ALLOCELEMENT_FLAG_NEVERFREE (4)
|
||||||
#define ALLOCELEMENT_FLAG_LOANED (8)
|
#define ALLOCELEMENT_FLAG_LOANED (8)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
To create a process-private pool, use
|
To create a process-private pool, use
|
||||||
CREATE_OBJECT(pool, lam_mem_pool_t, &mem_pool_cls);
|
CREATE_OBJECT(pool, lam_mem_pool_t, &mem_pool_cls);
|
||||||
@ -157,5 +159,4 @@ int lam_fmp_init_with(lam_fixed_mpool_t *pool, ssize_t initial_allocation,
|
|||||||
void *lam_fmp_get_mem_segment(lam_fixed_mpool_t *pool,
|
void *lam_fmp_get_mem_segment(lam_fixed_mpool_t *pool,
|
||||||
size_t length, size_t align, int which_pool);
|
size_t length, size_t align, int which_pool);
|
||||||
|
|
||||||
#endif
|
#endif /* LAM_MEMORY_POOL_H */
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
|
* $HEADER$
|
||||||
|
*
|
||||||
* Copyright 2002-2003. The Regents of the University of California. This material
|
* Copyright 2002-2003. The Regents of the University of California. This material
|
||||||
* was produced under U.S. Government contract W-7405-ENG-36 for Los Alamos
|
* was produced under U.S. Government contract W-7405-ENG-36 for Los Alamos
|
||||||
* National Laboratory, which is operated by the University of California for
|
* National Laboratory, which is operated by the University of California for
|
||||||
@ -28,10 +30,10 @@
|
|||||||
*/
|
*/
|
||||||
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
|
||||||
|
|
||||||
#ifndef SEG_LIST_H
|
#ifndef LAM_SEG_LIST_H
|
||||||
#define SEG_LIST_H
|
#define LAM_SEG_LIST_H
|
||||||
|
|
||||||
#include "lam/base/list.h"
|
#include "lam/lfc/list.h"
|
||||||
#include "lam/threads/mutex.h"
|
#include "lam/threads/mutex.h"
|
||||||
|
|
||||||
typedef struct lam_seg_list
|
typedef struct lam_seg_list
|
||||||
@ -100,7 +102,4 @@ static inline int lam_sgl_is_locked(lam_seg_list_t *slist)
|
|||||||
#define lam_sgl_inc_consec_fail(slist) \
|
#define lam_sgl_inc_consec_fail(slist) \
|
||||||
((slist)->sgl_consec_fail++)
|
((slist)->sgl_consec_fail++)
|
||||||
|
|
||||||
#endif /* SEG_LIST_H */
|
#endif /* LAM_SEG_LIST_H */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user