scip_mem.h
Go to the documentation of this file.
29 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
55 #define SCIPallocClearMemoryArray(scip,ptr,num) ( (BMSallocClearMemoryArray((ptr), (num)) == NULL) \
59 #define SCIPreallocMemoryArray(scip,ptr,newnum) ( (BMSreallocMemoryArray((ptr), (newnum)) == NULL) \
61 #define SCIPreallocMemorySize(scip,ptr,newsize) ( (BMSreallocMemorySize((ptr), (newsize)) == NULL) \
65 #define SCIPduplicateMemoryArray(scip, ptr, source, num) ( (BMSduplicateMemoryArray((ptr), (source), (num)) == NULL) \
78 #define SCIPallocBlockMemory(scip,ptr) ( (BMSallocBlockMemory(SCIPblkmem(scip), (ptr)) == NULL) \
80 #define SCIPallocBlockMemoryArray(scip,ptr,num) ( (BMSallocBlockMemoryArray(SCIPblkmem(scip), (ptr), (num)) == NULL) \
82 #define SCIPallocBlockMemorySize(scip,ptr,size) ( (BMSallocBlockMemorySize(SCIPblkmem(scip), (ptr), (size)) == NULL) \
84 #define SCIPallocClearBlockMemoryArray(scip,ptr,num) ( (BMSallocClearBlockMemoryArray(SCIPblkmem(scip), (ptr), (num)) == NULL) \
86 #define SCIPreallocBlockMemoryArray(scip,ptr,oldnum,newnum) ( (BMSreallocBlockMemoryArray(SCIPblkmem(scip), (ptr), (oldnum), (newnum)) == NULL) \
88 #define SCIPreallocBlockMemorySize(scip,ptr,oldsize,newsize) ( (BMSreallocBlockMemorySize(SCIPblkmem(scip), (ptr), (oldsize), (newsize)) == NULL) \
90 #define SCIPduplicateBlockMemory(scip, ptr, source) ( (BMSduplicateBlockMemory(SCIPblkmem(scip), (ptr), (source)) == NULL) \
92 #define SCIPduplicateBlockMemoryArray(scip, ptr, source, num) ( (BMSduplicateBlockMemoryArray(SCIPblkmem(scip), (ptr), (source), (num)) == NULL) \
94 #define SCIPensureBlockMemoryArray(scip,ptr,arraysizeptr,minsize) ( (SCIPensureBlockMemoryArray_call((scip), (void**)(ptr), sizeof(**(ptr)), (arraysizeptr), (minsize))) )
97 #define SCIPfreeBlockMemoryArray(scip,ptr,num) BMSfreeBlockMemoryArray(SCIPblkmem(scip), (ptr), (num))
98 #define SCIPfreeBlockMemoryArrayNull(scip,ptr,num) BMSfreeBlockMemoryArrayNull(SCIPblkmem(scip), (ptr), (num))
99 #define SCIPfreeBlockMemorySize(scip,ptr,size) BMSfreeBlockMemorySize(SCIPblkmem(scip), (ptr), (size))
100 #define SCIPfreeBlockMemorySizeNull(scip,ptr,size) BMSfreeBlockMemorySizeNull(SCIPblkmem(scip), (ptr), (size))
111 #define SCIPallocBufferArray(scip,ptr,num) ( (BMSallocBufferMemoryArray(SCIPbuffer(scip), (ptr), (num)) == NULL) \
113 #define SCIPallocClearBufferArray(scip,ptr,num) ( (BMSallocClearBufferMemoryArray(SCIPbuffer(scip), (ptr), (num)) == NULL) \
115 #define SCIPreallocBufferArray(scip,ptr,num) ( (BMSreallocBufferMemoryArray(SCIPbuffer(scip), (ptr), (num)) == NULL) \
117 #define SCIPduplicateBuffer(scip,ptr,source) ( (BMSduplicateBufferMemory(SCIPbuffer(scip), (ptr), (source), (size_t)sizeof(**(ptr))) \
119 #define SCIPduplicateBufferArray(scip,ptr,source,num) ( (BMSduplicateBufferMemoryArray(SCIPbuffer(scip), (ptr), (source), (num)) == NULL) \
127 #define SCIPallocCleanBuffer(scip,ptr) ( (BMSallocBufferMemory(SCIPcleanbuffer(scip), (ptr)) == NULL) \
129 #define SCIPallocCleanBufferArray(scip,ptr,num) ( (BMSallocBufferMemoryArray(SCIPcleanbuffer(scip), (ptr), (num)) == NULL) \
133 #define SCIPfreeCleanBufferArray(scip,ptr) BMSfreeBufferMemoryArray(SCIPcleanbuffer(scip), (ptr))
134 #define SCIPfreeCleanBufferArrayNull(scip,ptr) BMSfreeBufferMemoryArrayNull(SCIPcleanbuffer(scip), (ptr))
206 /** extends a dynamically allocated block memory array to be able to store at least the given number of elements;
209 * @return \ref SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See \ref
Definition: memory.c:2470
Definition: struct_scip.h:59
type definitions for return codes for SCIP methods
type definitions for SCIP's main datastructure
SCIP_EXPORT int SCIPcalcMemGrowSize(SCIP *scip, int num)
Definition: scip_mem.c:130
SCIP_EXPORT SCIP_RETCODE SCIPensureBlockMemoryArray_call(SCIP *scip, void **arrayptr, size_t elemsize, int *arraysize, int minsize)
Definition: scip_mem.c:146
SCIP_EXPORT void SCIPprintMemoryDiagnostic(SCIP *scip)
Definition: scip_mem.c:172
SCIP_EXPORT SCIP_Longint SCIPgetMemExternEstim(SCIP *scip)
Definition: scip_mem.c:117
common defines and data types used in all packages of SCIP
Definition: objbenders.h:33
memory allocation routines