globus_common 18.14
Loading...
Searching...
No Matches
globus_memory.h
Go to the documentation of this file.
1/*
2 * Copyright 1999-2006 University of Chicago
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
22#if !defined(GLOBUS_MEMORY_H)
23#define GLOBUS_MEMORY_H
24
25/******************************************************************************
26 Include header files
27******************************************************************************/
28#include "globus_types.h"
29#include "globus_module.h"
30#include "globus_thread.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
45/******************************************************************************
46 Type definitions
47******************************************************************************/
48
49struct globus_memory_s;
50typedef struct globus_memory_s * globus_memory_t;
51
53globus_i_memory_pre_activate();
54
57 globus_memory_t * mem_info,
58 int node_size,
59 int node_count);
60
61void *
63 globus_memory_t * mem_info);
64
67 globus_memory_t * mem_info,
68 void * buf);
69
72 globus_memory_t * mem_info);
73
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif /* GLOBUS_MEMORY_H */
Reference Counting Module Activation and Deactivation.
Globus Threading Abstraction.
Common Primitive Types.
int globus_bool_t
Boolean type.
Definition globus_types.h:93
globus_bool_t globus_memory_push_node(globus_memory_t *mem_info, void *buf)
Return a memory item to the pool.
Definition globus_memory.c:236
globus_bool_t globus_memory_destroy(globus_memory_t *mem_info)
Destroy a memory pool.
Definition globus_memory.c:277
globus_bool_t globus_memory_init(globus_memory_t *mem_info, int node_size, int node_count)
Initialize memory pool.
Definition globus_memory.c:99
void * globus_memory_pop_node(globus_memory_t *mem_info)
Retrieve a memory item from a pool.
Definition globus_memory.c:191