GME  13
apr_rmm.h
Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef APR_RMM_H
00018 #define APR_RMM_H
00019 
00029 #include "apr.h"
00030 #include "apr_pools.h"
00031 #include "apr_errno.h"
00032 #include "apu.h"
00033 #include "apr_anylock.h"
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif /* __cplusplus */
00038 
00040 typedef struct apr_rmm_t apr_rmm_t;
00041 
00043 typedef apr_size_t   apr_rmm_off_t;
00044 
00056 APU_DECLARE(apr_status_t) apr_rmm_init(apr_rmm_t **rmm, apr_anylock_t *lock,
00057                                        void *membuf, apr_size_t memsize, 
00058                                        apr_pool_t *cont);
00059 
00064 APU_DECLARE(apr_status_t) apr_rmm_destroy(apr_rmm_t *rmm);
00065 
00073 APU_DECLARE(apr_status_t) apr_rmm_attach(apr_rmm_t **rmm, apr_anylock_t *lock,
00074                                          void *membuf, apr_pool_t *cont);
00075 
00080 APU_DECLARE(apr_status_t) apr_rmm_detach(apr_rmm_t *rmm);
00081 
00087 APU_DECLARE(apr_rmm_off_t) apr_rmm_malloc(apr_rmm_t *rmm, apr_size_t reqsize);
00088 
00095 APU_DECLARE(apr_rmm_off_t) apr_rmm_realloc(apr_rmm_t *rmm, void *entity, apr_size_t reqsize);
00096 
00102 APU_DECLARE(apr_rmm_off_t) apr_rmm_calloc(apr_rmm_t *rmm, apr_size_t reqsize);
00103 
00109 APU_DECLARE(apr_status_t) apr_rmm_free(apr_rmm_t *rmm, apr_rmm_off_t entity);
00110 
00117 APU_DECLARE(void *) apr_rmm_addr_get(apr_rmm_t *rmm, apr_rmm_off_t entity);
00118 
00124 APU_DECLARE(apr_rmm_off_t) apr_rmm_offset_get(apr_rmm_t *rmm, void *entity);
00125 
00130 APU_DECLARE(apr_size_t) apr_rmm_overhead_get(int n);
00131 
00132 #ifdef __cplusplus
00133 }
00134 #endif
00135 
00136 #endif  /* ! APR_RMM_H */
00137