EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dbmf.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * SPDX-License-Identifier: EPICS
7 * EPICS BASE is distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
10 
35 #ifndef DBMF_H
36 #define DBMF_H
37 
38 #include <stdlib.h>
39 #include "libComAPI.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
56 LIBCOM_API int dbmfInit(size_t size, int chunkItems);
62 LIBCOM_API void * dbmfMalloc(size_t bytes);
70 LIBCOM_API char * dbmfStrdup(const char *str);
80 LIBCOM_API char * dbmfStrndup(const char *str, size_t len);
91 LIBCOM_API char * dbmfStrcat3(const char *lhs, const char *mid,
92  const char *rhs);
98 LIBCOM_API void dbmfFree(void *bytes);
102 LIBCOM_API void dbmfFreeChunks(void);
108 LIBCOM_API int dbmfShow(int level);
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
114 #endif
LIBCOM_API char * dbmfStrcat3(const char *lhs, const char *mid, const char *rhs)
Concatenate three strings.
LIBCOM_API void * dbmfMalloc(size_t bytes)
Allocate memory.
LIBCOM_API void dbmfFreeChunks(void)
Free all chunks that contain only free items.
LIBCOM_API void dbmfFree(void *bytes)
Free the memory allocated by dbmfMalloc.
LIBCOM_API int dbmfShow(int level)
Show the status of the dbmf memory pool.
LIBCOM_API int dbmfInit(size_t size, int chunkItems)
Initialize the facility.
LIBCOM_API char * dbmfStrdup(const char *str)
Duplicate a string.
LIBCOM_API char * dbmfStrndup(const char *str, size_t len)
Duplicate a string (up to len bytes).