Grid Community Toolkit  6.2.1705709074 (tag: v6.2.20240202)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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
33 extern "C" {
34 #endif
35 
45 /******************************************************************************
46  Type definitions
47 ******************************************************************************/
48 
49 struct globus_memory_s;
50 typedef struct globus_memory_s * globus_memory_t;
51 
53 globus_i_memory_pre_activate();
54 
57  globus_memory_t * mem_info,
58  int node_size,
59  int node_count);
60 
61 void *
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 */
Common Primitive Types.
globus_bool_t globus_memory_push_node(globus_memory_t *mem_info, void *buffer)
Return a memory item to the pool.
Definition: globus_memory.c:236
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
globus_bool_t globus_memory_destroy(globus_memory_t *mem_info)
Destroy a memory pool.
Definition: globus_memory.c:277
Globus Threading Abstraction.
int globus_bool_t
Boolean type.
Definition: globus_types.h:93
Reference Counting Module Activation and Deactivation.
void * globus_memory_pop_node(globus_memory_t *mem_info)
Retrieve a memory item from a pool.
Definition: globus_memory.c:191