Scippy

SCIP

Solving Constraint Integer Programs

memory.h File Reference

Detailed Description

memory allocation routines

Author
Tobias Achterberg

Definition in file memory.h.

#include <limits.h>
#include <stdlib.h>

Go to the source code of this file.

Macros

#define ASSIGN(pointerstarstar, voidstarfunction)   (*(pointerstarstar) = (voidstarfunction))
 
#define EXTERN   extern
 
#define BMSallocMemoryArray(ptr, num)
 
#define BMSreallocMemoryArray(ptr, num)
 
#define BMSallocMemoryArrayCPP(num, size)
 
#define BMSallocClearMemoryArray(ptr, num)
 
#define BMSallocMemory(ptr)   ASSIGN((ptr), BMSallocMemory_call( sizeof(**(ptr)), __FILE__, __LINE__ ))
 
#define BMSallocMemorySize(ptr, size)   ASSIGN((ptr), BMSallocMemory_call( (size_t)(size), __FILE__, __LINE__ ))
 
#define BMSallocMemoryCPP(size)   BMSallocMemory_call( (size_t)(size), __FILE__, __LINE__ )
 
#define BMSreallocMemorySize(ptr, size)
 
#define BMSclearMemory(ptr)   BMSclearMemory_call( (void*)(ptr), sizeof(*(ptr)) )
 
#define BMSclearMemoryArray(ptr, num)   BMSclearMemory_call( (void*)(ptr), (num)*sizeof(*(ptr)) )
 
#define BMSclearMemorySize(ptr, size)   BMSclearMemory_call( (void*)(ptr), (size_t)(size) )
 
#define BMScopyMemory(ptr, source)   BMScopyMemory_call( (void*)(ptr), (const void*)(source), sizeof(*(ptr)) )
 
#define BMScopyMemoryArray(ptr, source, num)   BMScopyMemory_call( (void*)(ptr), (const void*)(source), (num)*sizeof(*(ptr)) )
 
#define BMScopyMemorySize(ptr, source, size)   BMScopyMemory_call( (void*)(ptr), (const void*)(source), (size_t)(size) )
 
#define BMSmoveMemory(ptr, source)   BMSmoveMemory_call( (void*)(ptr), (const void*)(source), sizeof(*(ptr)) )
 
#define BMSmoveMemoryArray(ptr, source, num)   BMSmoveMemory_call( (void*)(ptr), (const void*)(source), (num) * sizeof(*(ptr)) )
 
#define BMSmoveMemorySize(ptr, source, size)   BMSmoveMemory_call( (void*)(ptr), (const void*)(source), (size_t)(size) )
 
#define BMSduplicateMemory(ptr, source)
 
#define BMSduplicateMemoryArray(ptr, source, num)
 
#define BMSduplicateMemorySize(ptr, source, size)
 
#define BMSfreeMemory(ptr)
 
#define BMSfreeMemoryNull(ptr)   { if( *(ptr) != NULL ) BMSfreeMemory( (ptr) ); }
 
#define BMSfreeMemoryArray(ptr)
 
#define BMSfreeMemoryArrayNull(ptr)   { if( *(ptr) != NULL ) BMSfreeMemoryArray( (ptr) ); }
 
#define BMSfreeMemorySize(ptr)
 
#define BMSfreeMemorySizeNull(ptr)   { if( *(ptr) != NULL ) BMSfreeMemorySize( (ptr) ); }
 
#define BMSgetPointerSize(ptr)   BMSgetPointerSize_call(ptr)
 
#define BMSdisplayMemory()   BMSdisplayMemory_call()
 
#define BMScheckEmptyMemory()   BMScheckEmptyMemory_call()
 
#define BMSgetMemoryUsed()   BMSgetMemoryUsed_call()
 
#define BMScreateChunkMemory(sz, isz, gbf)   BMScreateChunkMemory_call( (sz), (isz), (gbf), __FILE__, __LINE__ )
 
#define BMSclearChunkMemory(mem)   BMSclearChunkMemory_call( (mem), __FILE__, __LINE__ )
 
#define BMSclearChunkMemoryNull(mem)   { if( (mem) != NULL ) BMSclearChunkMemory( (mem) ); }
 
#define BMSdestroyChunkMemory(mem)   BMSdestroyChunkMemory_call( (mem), __FILE__, __LINE__ )
 
#define BMSdestroyChunkMemoryNull(mem)   { if( *(mem) != NULL ) BMSdestroyChunkMemory( (mem) ); }
 
#define BMSallocChunkMemory(mem, ptr)
 
#define BMSduplicateChunkMemory(mem, ptr, source)
 
#define BMSfreeChunkMemory(mem, ptr)
 
#define BMSfreeChunkMemoryNull(mem, ptr)   { if( *(ptr) != NULL ) BMSfreeChunkMemory( (mem), (ptr) ); }
 
#define BMSgarbagecollectChunkMemory(mem)   BMSgarbagecollectChunkMemory_call(mem)
 
#define BMSgetChunkMemoryUsed(mem)   BMSgetChunkMemoryUsed_call(mem)
 
#define BMSallocBlockMemoryArray(mem, ptr, num)
 
#define BMSreallocBlockMemoryArray(mem, ptr, oldnum, newnum)
 
#define BMScreateBlockMemory(csz, gbf)   BMScreateBlockMemory_call( (csz), (gbf), __FILE__, __LINE__ )
 
#define BMSclearBlockMemory(mem)   BMSclearBlockMemory_call( (mem), __FILE__, __LINE__ )
 
#define BMSclearBlockMemoryNull(mem)   { if( (mem) != NULL ) BMSclearBlockMemory( (mem) ); }
 
#define BMSdestroyBlockMemory(mem)   BMSdestroyBlockMemory_call( (mem), __FILE__, __LINE__ )
 
#define BMSdestroyBlockMemoryNull(mem)   { if( *(mem) != NULL ) BMSdestroyBlockMemory( (mem) ); }
 
#define BMSallocBlockMemory(mem, ptr)
 
#define BMSallocBlockMemorySize(mem, ptr, size)
 
#define BMSreallocBlockMemorySize(mem, ptr, oldsize, newsize)
 
#define BMSduplicateBlockMemory(mem, ptr, source)
 
#define BMSduplicateBlockMemoryArray(mem, ptr, source, num)
 
#define BMSfreeBlockMemory(mem, ptr)
 
#define BMSfreeBlockMemoryNull(mem, ptr)   { if( *(ptr) != NULL ) BMSfreeBlockMemory( (mem), (ptr) ); }
 
#define BMSfreeBlockMemoryArray(mem, ptr, num)
 
#define BMSfreeBlockMemoryArrayNull(mem, ptr, num)   { if( *(ptr) != NULL ) BMSfreeBlockMemoryArray( (mem), (ptr), (num) ); }
 
#define BMSfreeBlockMemorySize(mem, ptr, size)
 
#define BMSfreeBlockMemorySizeNull(mem, ptr, size)   { if( *(ptr) != NULL ) BMSfreeBlockMemorySize( (mem), (ptr), (size) ); }
 
#define BMSgarbagecollectBlockMemory(mem)   BMSgarbagecollectBlockMemory_call(mem)
 
#define BMSgetBlockMemoryUsed(mem)   BMSgetBlockMemoryUsed_call(mem)
 
#define BMSgetBlockPointerSize(mem, ptr)   BMSgetBlockPointerSize_call((mem), (ptr))
 
#define BMSdisplayBlockMemory(mem)   BMSdisplayBlockMemory_call(mem)
 
#define BMSblockMemoryCheckEmpty(mem)   BMScheckEmptyBlockMemory_call(mem)
 

Typedefs

typedef struct BMS_ChkMem BMS_CHKMEM
 
typedef struct BMS_BlkMem BMS_BLKMEM
 

Functions

void * BMSallocClearMemory_call (size_t num, size_t size, const char *filename, int line)
 
void * BMSallocMemory_call (size_t size, const char *filename, int line)
 
void * BMSreallocMemory_call (void *ptr, size_t size, const char *filename, int line)
 
void BMSclearMemory_call (void *ptr, size_t size)
 
void BMScopyMemory_call (void *ptr, const void *source, size_t size)
 
void BMSmoveMemory_call (void *ptr, const void *source, size_t size)
 
void * BMSduplicateMemory_call (const void *source, size_t size, const char *filename, int line)
 
void BMSfreeMemory_call (void *ptr, const char *filename, int line)
 
size_t BMSgetPointerSize_call (const void *ptr)
 
void BMSdisplayMemory_call (void)
 
void BMScheckEmptyMemory_call (void)
 
long long BMSgetMemoryUsed_call (void)
 
void BMSalignMemsize (size_t *size)
 
int BMSisAligned (size_t size)
 
BMS_CHKMEMBMScreateChunkMemory_call (size_t size, int initchunksize, int garbagefactor, const char *filename, int line)
 
void BMSclearChunkMemory_call (BMS_CHKMEM *chkmem, const char *filename, int line)
 
void BMSdestroyChunkMemory_call (BMS_CHKMEM **chkmem, const char *filename, int line)
 
void * BMSallocChunkMemory_call (BMS_CHKMEM *chkmem, size_t size, const char *filename, int line)
 
void * BMSduplicateChunkMemory_call (BMS_CHKMEM *chkmem, const void *source, size_t size, const char *filename, int line)
 
void BMSfreeChunkMemory_call (BMS_CHKMEM *chkmem, void *ptr, size_t size, const char *filename, int line)
 
void BMSgarbagecollectChunkMemory_call (BMS_CHKMEM *chkmem)
 
long long BMSgetChunkMemoryUsed_call (const BMS_CHKMEM *chkmem)
 
BMS_BLKMEMBMScreateBlockMemory_call (int initchunksize, int garbagefactor, const char *filename, int line)
 
void BMSclearBlockMemory_call (BMS_BLKMEM *blkmem, const char *filename, int line)
 
void BMSdestroyBlockMemory_call (BMS_BLKMEM **blkmem, const char *filename, int line)
 
void * BMSallocBlockMemory_call (BMS_BLKMEM *blkmem, size_t size, const char *filename, int line)
 
void * BMSreallocBlockMemory_call (BMS_BLKMEM *blkmem, void *ptr, size_t oldsize, size_t newsize, const char *filename, int line)
 
void * BMSduplicateBlockMemory_call (BMS_BLKMEM *blkmem, const void *source, size_t size, const char *filename, int line)
 
void BMSfreeBlockMemory_call (BMS_BLKMEM *blkmem, void *ptr, size_t size, const char *filename, int line)
 
void BMSgarbagecollectBlockMemory_call (BMS_BLKMEM *blkmem)
 
long long BMSgetBlockMemoryUsed_call (const BMS_BLKMEM *blkmem)
 
size_t BMSgetBlockPointerSize_call (const BMS_BLKMEM *blkmem, const void *ptr)
 
void BMSdisplayBlockMemory_call (const BMS_BLKMEM *blkmem)
 
void BMScheckEmptyBlockMemory_call (const BMS_BLKMEM *blkmem)
 

Macro Definition Documentation

#define ASSIGN (   pointerstarstar,
  voidstarfunction 
)    (*(pointerstarstar) = (voidstarfunction))

Definition at line 40 of file memory.h.

#define EXTERN   extern

Definition at line 52 of file memory.h.

#define BMSallocMemoryArray (   ptr,
  num 
)
Value:
( ( ((size_t)(num)) > (UINT_MAX / sizeof(**(ptr))) ) \
? ( ASSIGN((ptr), NULL) ) \
: ( ASSIGN((ptr), BMSallocMemory_call( (num)*sizeof(**(ptr)), \
__FILE__, __LINE__ )) ) )

Definition at line 76 of file memory.h.

Referenced by allocDiveChgSideArrays(), branch(), createClique(), createCliquehash(), doCdata(), ensureSuccessorsSize(), eval(), exprgraphNodeEval(), exprgraphNodeUpdateBounds(), getASlice(), getAttrval(), getEndptrs(), getIndicesFromDense(), getIndicesRange(), getName(), lpiGetBInvVec(), lpiStrongbranch(), lpiStrongbranches(), procPcdata(), SCIPdialoghdlrCreate(), SCIPdigraphComputeUndirectedComponents(), SCIPdigraphSetSizes(), SCIPdigraphTopoSortComponents(), SCIPexprCheckCurvature(), SCIPexprEval(), SCIPexprEvalInt(), SCIPexprgraphSimplify(), SCIPexprgraphUpdateNodeBoundsCurvature(), SCIPexprtreePrintWithNames(), SCIPexprtreeSimplify(), SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiChgBounds(), SCIPlpiChgSides(), SCIPlpiCreate(), SCIPlpiDelCols(), SCIPlpiDelColset(), SCIPlpiDelRows(), SCIPlpiDelRowset(), SCIPlpiGetBasisInd(), SCIPlpiGetBInvACol(), SCIPlpiGetBInvARow(), SCIPlpiGetBInvCol(), SCIPlpiGetBInvRow(), SCIPlpiGetCoef(), SCIPlpiGetColNames(), SCIPlpiGetCols(), SCIPlpiGetPrimalRay(), SCIPlpiGetRowNames(), SCIPlpiGetRows(), SCIPlpiGetSol(), SCIPlpiLoadColLP(), SCIPlpiScaleCol(), SCIPlpiScaleRow(), SCIPlpiSetBase(), SCIPlpiStrongbranchFrac(), SCIPmessagehdlrCreate(), SCIPprofileCreate(), SCIPreaderWrite(), SCIPsparseSolCreate(), tcliqueAddEdge(), tcliqueColoring(), tcliqueLoadFile(), tcliqueMaxClique(), and xmlProcess().

#define BMSreallocMemoryArray (   ptr,
  num 
)
Value:
( ( ((size_t)(num)) > (UINT_MAX / sizeof(**(ptr))) ) \
? ( ASSIGN((ptr), NULL) ) \
: ( ASSIGN((ptr), BMSreallocMemory_call( *(ptr), (num)*sizeof(**(ptr)), \
__FILE__, __LINE__ )) ) )

Definition at line 80 of file memory.h.

Referenced by cliquetableEnsureSize(), conflictEnsureConflictsetsMem(), conflictEnsureTmpbdchginfosMem(), conshdlrEnsureCheckconssMem(), conshdlrEnsureConssMem(), conshdlrEnsureEnfoconssMem(), conshdlrEnsureInitconssMem(), conshdlrEnsurePropconssMem(), conshdlrEnsureSepaconssMem(), conshdlrEnsureUpdateconssMem(), cutpoolEnsureCutsMem(), doCdata(), ensureBoundchgMem(), ensureChgcolsSize(), ensureChgrowsSize(), ensureCliquehashSize(), ensureColMem(), ensureColsSize(), ensureCstatMem(), ensureExistingsolsSize(), ensureExterncandsSize(), ensureLazycolsSize(), ensureLpcandsSize(), ensureLpicolsSize(), ensureLpirowsSize(), ensureProfileSize(), ensurePropagationStorage(), ensurePseudocandsSize(), ensureRowMem(), ensureRowsSize(), ensureRstatMem(), ensureSidechgMem(), ensureSolsSize(), ensureStateMem(), ensureSubdialogMem(), ensureSuccessorsSize(), ensureTabMem(), ensureValMem(), eventqueueEnsureEventsMem(), getAttrval(), getName(), linkChunk(), nodepqResize(), paramsetAdd(), pqueueResize(), pricestoreEnsureBdviolvarsMem(), pricestoreEnsureVarsMem(), probEnsureConssMem(), probEnsureDeletedvarsMem(), probEnsureFixedvarsMem(), probEnsureVarsMem(), procPcdata(), queueResize(), reallocDiveChgSideArrays(), SCIPbufferAllocMem(), SCIPdigraphComputeUndirectedComponents(), SCIPdigraphResize(), SCIPsetIncludeBranchrule(), SCIPsetIncludeConflicthdlr(), SCIPsetIncludeConshdlr(), SCIPsetIncludeDialog(), SCIPsetIncludeDisp(), SCIPsetIncludeEventhdlr(), SCIPsetIncludeExternalCode(), SCIPsetIncludeHeur(), SCIPsetIncludeNlpi(), SCIPsetIncludeNodesel(), SCIPsetIncludePresol(), SCIPsetIncludePricer(), SCIPsetIncludeProp(), SCIPsetIncludeReader(), SCIPsetIncludeRelax(), SCIPsetIncludeSepa(), sepastoreEnsureCutsMem(), tcliqueEnsureSizeCachedEdges(), tcliqueEnsureSizeEdges(), tcliqueEnsureSizeNodes(), treeEnsureChildrenMem(), treeEnsurePathMem(), and treeEnsurePendingbdchgsMem().

#define BMSallocMemoryArrayCPP (   num,
  size 
)
Value:
( ( ((size_t)(num)) > (UINT_MAX / size) ) \
? ( ASSIGN((ptr), NULL) ) \
:( BMSallocMemory_call( (size_t)((num)*(size)), __FILE__, __LINE__ ) ) )

Definition at line 84 of file memory.h.

#define BMSallocClearMemoryArray (   ptr,
  num 
)
Value:
( ( ((size_t)(num)) > (UINT_MAX / sizeof(**(ptr))) ) \
? ( ASSIGN((ptr), NULL) ) \
: ( ASSIGN((ptr), BMSallocClearMemory_call((size_t)(num), sizeof(**(ptr)), __FILE__, __LINE__ )) ) )

Definition at line 87 of file memory.h.

Referenced by hashtableResize(), SCIPdigraphComputeUndirectedComponents(), SCIPdigraphCopy(), SCIPdigraphCreate(), SCIPdigraphTopoSortComponents(), SCIPhashmapCreate(), SCIPhashtableCreate(), SCIPshrinkDisjunctiveVarSet(), and SCIPsparseSolCreate().

#define BMSallocMemorySize (   ptr,
  size 
)    ASSIGN((ptr), BMSallocMemory_call( (size_t)(size), __FILE__, __LINE__ ))
#define BMSallocMemoryCPP (   size)    BMSallocMemory_call( (size_t)(size), __FILE__, __LINE__ )

Definition at line 94 of file memory.h.

Referenced by SCIPlpiCreate().

#define BMSreallocMemorySize (   ptr,
  size 
)
Value:
ASSIGN((ptr), BMSreallocMemory_call( *(ptr), (size_t)(size), \
__FILE__, __LINE__ ))

Definition at line 95 of file memory.h.

Referenced by SCIPbufferAllocMem(), and SCIPbufferReallocMem().

#define BMSclearMemoryArray (   ptr,
  num 
)    BMSclearMemory_call( (void*)(ptr), (num)*sizeof(*(ptr)) )

Definition at line 98 of file memory.h.

Referenced by addCliques(), addNegatedCliques(), aggregation(), branch(), checkCurvature(), checkFactorable(), checkForOverlapping(), checkSolution(), checkSystemGF2(), cleanupNetwork(), cliquePresolve(), computeCut(), computeMinDistance(), conflictsetCalcInsertDepth(), consCatchAllEvents(), constructSNFRelaxation(), createCoveringProblem(), createSubproblem(), createSubSCIP(), createSubscip(), createTcliqueGraph(), decomposeProblem(), detectParallelCols(), ensureMemorySize(), evalFunctionGradient(), exprgraphEnsureDepth(), exprgraphNodeAddChildren(), exprgraphNodeSimplify(), exprsimplifyAddChildren(), exprsimplifyRemovePolynomialUnusedChildren(), exprsimplifySeparateLinearFromPolynomial(), exprUnconvertPolynomial(), extractCapacityRows(), extractCliques(), extractFlow(), extractNodes(), fillDigraph(), findAggregation(), findNewBounds(), fullDualPresolve(), generateClusterCuts(), generateCutConvex(), generateCutNonConvex(), getFlowCover(), getInputString(), getLiftingSequenceGUB(), getNextLine(), getNodeIdx(), getRelevantColumns(), getRelevantRows(), getZerohalfWeightvectorForSingleRow(), getZerohalfWeightvectorFromSelectedRowsBitarray(), identifySourcesTargets(), initBounds(), initData(), initMatrix(), initPropdata(), insertSortedRootNeighbors(), lpbdchgsCreate(), lpbdchgsReset(), lpCleanupCols(), lpCleanupRows(), lpRemoveObsoleteCols(), lpRemoveObsoleteRows(), mcfnetworkExtract(), mcfnetworkFill(), nlpSolve(), nlrowRemoveFixedQuadVars(), nodepartitionCreate(), preprocessCliques(), preprocessColumns(), preprocessConsiderMinSlack(), preprocessIdenticalColums(), preprocessRows(), preprocessTrivialZerohalfCuts(), presolveConsEffectiveHorizon(), presolvePropagateCons(), presolveRemoveFixedVariables(), printPseudobooleanCons(), process(), processNlRow(), propagateCons(), propdataInit(), readOPBFile(), reformulate(), removeDoubleAndSingletonsAndPerformDualpresolve(), removeRedundantConssAndNonzeros(), resolvePropagationCoretimes(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSINIT(), SCIP_DECL_CONSINITPRE(), SCIP_DECL_CONSINITSOL(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PRESOLEXEC(), SCIP_DECL_PROPEXEC(), SCIP_DECL_PROPPRESOL(), SCIP_DECL_QUADCONSUPGD(), SCIP_DECL_SEPAEXECLP(), SCIPboolarrayClear(), SCIPcreateConsSOC(), SCIPdigraphComputeUndirectedComponents(), SCIPexprgraphGetSubtreeVarsUsage(), SCIPexprgraphNodeSplitOffLinear(), SCIPexprtreeCreate(), SCIPexprtreeGetVarsUsage(), SCIPexprtreeRemoveFixedVars(), SCIPgetBinvarRepresentatives(), SCIPintarrayClear(), SCIPlpComputeRelIntPoint(), SCIPlpGetSol(), SCIPlpiGetBInvRow(), SCIPlpiGetRows(), SCIPlpiGetSides(), SCIPlpRemoveRedundantRows(), SCIPnlpGetVarsNonlinearity(), SCIPnlpiOracleAddVars(), SCIPnlpiOracleGetHessianLagSparsity(), SCIPnlpiOracleGetJacobianSparsity(), SCIPprimalTransformSol(), SCIPptrarrayClear(), SCIPrealarrayClear(), SCIPseparateRelaxedKnapsack(), SCIPshrinkDisjunctiveVarSet(), SCIPwritePbm(), separateCuts(), separateGLS(), separateHeur(), sequentialUpAndDownLifting(), sequentialUpAndDownLiftingGUB(), setColumnMajorFormat(), singletonColumnStuffing(), stableSort(), stableSortBinvars(), storeMod2Data(), sumMIRRow(), sumStrongCGRow(), superadditiveUpLifting(), tcliqueAddEdge(), tcliqueColoring(), tcliquegraphConstructCliqueTable(), tightenWeightsLift(), topologicalSort(), tryUpgradingXor(), undoBdchgsDualfarkas(), undoBdchgsDualsol(), updatePrimalRay(), and updateVariableDegrees().

#define BMSclearMemorySize (   ptr,
  size 
)    BMSclearMemory_call( (void*)(ptr), (size_t)(size) )

Definition at line 99 of file memory.h.

#define BMScopyMemory (   ptr,
  source 
)    BMScopyMemory_call( (void*)(ptr), (const void*)(source), sizeof(*(ptr)) )

Definition at line 101 of file memory.h.

#define BMScopyMemoryArray (   ptr,
  source,
  num 
)    BMScopyMemory_call( (void*)(ptr), (const void*)(source), (num)*sizeof(*(ptr)) )

Definition at line 102 of file memory.h.

Referenced by addConcaveEstimatorMultivariate(), computeConsAndDataChanges(), conflictsetCopy(), createSolTuple(), cutGenerationHeuristic(), extendCliqueZeroWeight(), mergeAndCleanQuadVarTerms(), newSolution(), polynomialdataAddMonomials(), presolComponents(), removeConstraintsDueToNegCliques(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONSGETVARS(), SCIP_DECL_CONSTRANS(), SCIP_DECL_HEUREXEC(), SCIP_DECL_NLPISETINITIALGUESS(), SCIPboolarrayExtend(), SCIPconshdlrsStorePropagationStatus(), SCIPcreateConsPseudobooleanWithConss(), SCIPdigraphComputeUndirectedComponents(), SCIPexprAddMonomialFactors(), SCIPexprAddToLinear(), SCIPexprCreateLinear(), SCIPexprgraphAddExprtreeSum(), SCIPexprgraphCreateNodeLinear(), SCIPexprgraphReplaceVarByLinearSum(), SCIPexprgraphSetVarsBounds(), SCIPexprtreeAddVars(), SCIPexprtreeSetParams(), SCIPexprtreeSetVars(), SCIPgetBinvarRepresentatives(), SCIPgetRandomSubset(), SCIPintarrayExtend(), SCIPlpCalcMIR(), SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiGetBounds(), SCIPlpiGetCols(), SCIPlpiGetDualfarkas(), SCIPlpiGetObj(), SCIPlpiGetPrimalRay(), SCIPlpiGetRows(), SCIPlpiGetSides(), SCIPlpiGetSol(), SCIPlpiLoadColLP(), SCIPnlpiOracleAddVars(), SCIPnlpiOracleEvalJacobian(), SCIPnlpiOracleGetJacobianSparsity(), SCIPnlpSetInitialGuess(), SCIPptrarrayExtend(), SCIPrealarrayExtend(), SCIPvarsGetActiveVars(), separateByEnumerationHeuristics(), stableSortBinvars(), storeMod2Data(), tcliqueColoring(), tcliqueLoadFile(), tryToInsert(), and xmlProcess().

#define BMScopyMemorySize (   ptr,
  source,
  size 
)    BMScopyMemory_call( (void*)(ptr), (const void*)(source), (size_t)(size) )
#define BMSmoveMemory (   ptr,
  source 
)    BMSmoveMemory_call( (void*)(ptr), (const void*)(source), sizeof(*(ptr)) )

Definition at line 105 of file memory.h.

#define BMSmoveMemoryArray (   ptr,
  source,
  num 
)    BMSmoveMemory_call( (void*)(ptr), (const void*)(source), (num) * sizeof(*(ptr)) )
#define BMSmoveMemorySize (   ptr,
  source,
  size 
)    BMSmoveMemory_call( (void*)(ptr), (const void*)(source), (size_t)(size) )

Definition at line 107 of file memory.h.

#define BMSduplicateMemory (   ptr,
  source 
)
Value:
ASSIGN((ptr), BMSduplicateMemory_call( (const void*)(source), \
sizeof(**(ptr)), __FILE__, __LINE__ ))

Definition at line 109 of file memory.h.

#define BMSduplicateMemorySize (   ptr,
  source,
  size 
)
Value:
ASSIGN((ptr), BMSduplicateMemory_call( (const void*)(source), \
(size_t)(size), __FILE__, __LINE__ ))

Definition at line 114 of file memory.h.

#define BMSfreeMemory (   ptr)
Value:
{ BMSfreeMemory_call( (void*)(*(ptr)), __FILE__, __LINE__ ); \
*(ptr) = NULL; }

Definition at line 117 of file memory.h.

Referenced by BMSdestroyBlockMemory_call(), destroyChkmem(), destroyChunk(), dialogFree(), freeClique(), freeCliquehash(), hashmaplistFree(), hashmaplistRemove(), linelistFree(), messagehdlrFree(), popPstack(), resetVarname(), SCIPactivityFree(), SCIPbranchcandFree(), SCIPbranchruleFree(), SCIPbtFree(), SCIPbufferFree(), SCIPbufferFreeMem(), SCIPcliquetableFree(), SCIPclockFree(), SCIPconflictFree(), SCIPconflicthdlrFree(), SCIPconshdlrFree(), SCIPcutpoolFree(), SCIPdialoghdlrFree(), SCIPdigraphFree(), SCIPdispFree(), SCIPeventhdlrFree(), SCIPeventqueueFree(), SCIPexprintFree(), SCIPfree(), SCIPhashmapFree(), SCIPhashtableFree(), SCIPheurFree(), SCIPinterruptFree(), SCIPlpFree(), SCIPlpiFree(), SCIPmemFree(), SCIPmessageVFPrintDialog(), SCIPmessageVFPrintInfo(), SCIPmessageVFPrintVerbInfo(), SCIPmessageVFPrintWarning(), SCIPmessageVPrintError(), SCIPnlpFree(), SCIPnlpiFree(), SCIPnlpiOracleFree(), SCIPnlpStatisticsFree(), SCIPnodepqDestroy(), SCIPnodeselFree(), SCIPparamsetFree(), SCIPpqueueFree(), SCIPpresolFree(), SCIPpricerFree(), SCIPpricestoreFree(), SCIPprimalFree(), SCIPprobFree(), SCIPprofileFree(), SCIPpropFree(), SCIPqueueFree(), SCIPreaderFree(), SCIPreaderWrite(), SCIPrelaxationFree(), SCIPrelaxFree(), SCIPsepaFree(), SCIPsepastoreFree(), SCIPsetFree(), SCIPsparseSolFree(), SCIPstatFree(), SCIPtreeFree(), SCIPvbcFree(), tcliqueFree(), xmlFreeAttr(), and xmlFreeNode().

#define BMSfreeMemoryNull (   ptr)    { if( *(ptr) != NULL ) BMSfreeMemory( (ptr) ); }

Definition at line 119 of file memory.h.

Referenced by SCIPlpFree().

#define BMSfreeMemoryArray (   ptr)
Value:
{ BMSfreeMemory_call( (void*)(*(ptr)), __FILE__, __LINE__ ); \
*(ptr) = NULL; }

Definition at line 120 of file memory.h.

Referenced by branch(), doCdata(), exprgraphNodeEval(), exprgraphNodeUpdateBounds(), freeClique(), freeCliquehash(), getASlice(), getAttrval(), getName(), handleDecl(), handleEndtag(), handleStarttag(), hashtableResize(), linelistFree(), lpiGetBInvVec(), lpiStrongbranch(), lpiStrongbranches(), paramFree(), procInTag(), procPcdata(), SCIPbranchruleFree(), SCIPconflicthdlrFree(), SCIPconshdlrFree(), SCIPdialoghdlrFree(), SCIPdigraphComputeUndirectedComponents(), SCIPdigraphFree(), SCIPdigraphFreeComponents(), SCIPdigraphTopoSortComponents(), SCIPdispAutoActivate(), SCIPdispFree(), SCIPeventhdlrFree(), SCIPexprCheckCurvature(), SCIPexprEval(), SCIPexprEvalInt(), SCIPexprgraphSimplify(), SCIPexprgraphUpdateNodeBoundsCurvature(), SCIPexprtreePrintWithNames(), SCIPexprtreeSimplify(), SCIPhashmapFree(), SCIPhashtableFree(), SCIPheurFree(), SCIPincludeDialogDefaultFix(), SCIPincludeDialogDefaultSet(), SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiChgBounds(), SCIPlpiChgSides(), SCIPlpiDelCols(), SCIPlpiDelColset(), SCIPlpiDelRows(), SCIPlpiDelRowset(), SCIPlpiFree(), SCIPlpiGetBasisInd(), SCIPlpiGetBInvACol(), SCIPlpiGetBInvARow(), SCIPlpiGetBInvCol(), SCIPlpiGetBInvRow(), SCIPlpiGetCoef(), SCIPlpiGetCols(), SCIPlpiGetPrimalRay(), SCIPlpiGetRows(), SCIPlpiGetSol(), SCIPlpiLoadColLP(), SCIPlpiScaleCol(), SCIPlpiScaleRow(), SCIPlpiSetBase(), SCIPlpiStrongbranchFrac(), SCIPnlpiFree(), SCIPnodeselFree(), SCIPpqueueFree(), SCIPpresolFree(), SCIPpricerFree(), SCIPprobFree(), SCIPprobSetName(), SCIPprofileFree(), SCIPpropFree(), SCIPqueueFree(), SCIPreaderFree(), SCIPreaderWrite(), SCIPrelaxFree(), SCIPsepaFree(), SCIPshrinkDisjunctiveVarSet(), SCIPsparseSolFree(), SCIPtransformMinUC(), tcliqueColoring(), tcliqueFlush(), tcliqueFree(), tcliqueLoadFile(), tcliqueMaxClique(), writeProblem(), xmlFreeAttr(), xmlFreeNode(), and xmlProcess().

#define BMSfreeMemorySize (   ptr)
Value:
{ BMSfreeMemory_call( (void*)(*(ptr)), __FILE__, __LINE__ ); \
*(ptr) = NULL; }

Definition at line 123 of file memory.h.

#define BMSfreeMemorySizeNull (   ptr)    { if( *(ptr) != NULL ) BMSfreeMemorySize( (ptr) ); }

Definition at line 125 of file memory.h.

#define BMSgetPointerSize (   ptr)    BMSgetPointerSize_call(ptr)

Definition at line 128 of file memory.h.

#define BMSdisplayMemory ( )    BMSdisplayMemory_call()

Definition at line 129 of file memory.h.

Referenced by SCIPprintMemoryDiagnostic().

#define BMScheckEmptyMemory ( )    BMScheckEmptyMemory_call()

Definition at line 130 of file memory.h.

Referenced by SCIPrunShell().

#define BMSgetMemoryUsed ( )    BMSgetMemoryUsed_call()

Definition at line 131 of file memory.h.

Referenced by branch().

#define BMScreateChunkMemory (   sz,
  isz,
  gbf 
)    BMScreateChunkMemory_call( (sz), (isz), (gbf), __FILE__, __LINE__ )

Definition at line 245 of file memory.h.

Referenced by tcliqueMaxClique().

#define BMSclearChunkMemory (   mem)    BMSclearChunkMemory_call( (mem), __FILE__, __LINE__ )

Definition at line 246 of file memory.h.

Referenced by tcliqueColoring().

#define BMSclearChunkMemoryNull (   mem)    { if( (mem) != NULL ) BMSclearChunkMemory( (mem) ); }

Definition at line 247 of file memory.h.

#define BMSdestroyChunkMemory (   mem)    BMSdestroyChunkMemory_call( (mem), __FILE__, __LINE__ )

Definition at line 248 of file memory.h.

Referenced by tcliqueMaxClique().

#define BMSdestroyChunkMemoryNull (   mem)    { if( *(mem) != NULL ) BMSdestroyChunkMemory( (mem) ); }

Definition at line 249 of file memory.h.

#define BMSallocChunkMemory (   mem,
  ptr 
)
Value:
ASSIGN((ptr), BMSallocChunkMemory_call((mem), sizeof(**(ptr)), \
__FILE__, __LINE__))

Definition at line 251 of file memory.h.

Referenced by tcliqueColoring(), and updateNeighbor().

#define BMSduplicateChunkMemory (   mem,
  ptr,
  source 
)
Value:
ASSIGN((ptr), BMSduplicateChunkMemory_call((mem), (const void*)(source), \
sizeof(**(ptr)), __FILE__, __LINE__ ))

Definition at line 253 of file memory.h.

#define BMSfreeChunkMemory (   mem,
  ptr 
)
Value:
{ BMSfreeChunkMemory_call( (mem), (void*)(*(ptr)), sizeof(**(ptr)), \
__FILE__, __LINE__ ); \
*(ptr) = NULL; }

Definition at line 256 of file memory.h.

Referenced by tcliqueColoring(), and updateNeighbor().

#define BMSfreeChunkMemoryNull (   mem,
  ptr 
)    { if( *(ptr) != NULL ) BMSfreeChunkMemory( (mem), (ptr) ); }

Definition at line 259 of file memory.h.

#define BMSgarbagecollectChunkMemory (   mem)    BMSgarbagecollectChunkMemory_call(mem)

Definition at line 260 of file memory.h.

#define BMSgetChunkMemoryUsed (   mem)    BMSgetChunkMemoryUsed_call(mem)

Definition at line 261 of file memory.h.

Referenced by branch().

#define BMSallocBlockMemoryArray (   mem,
  ptr,
  num 
)
Value:
( ( ((size_t)(num)) > UINT_MAX / sizeof(**(ptr)) ) \
? ( ASSIGN((ptr), NULL) ) \
: ( ASSIGN((ptr), BMSallocBlockMemory_call((mem), (num)*sizeof(**(ptr)),\
__FILE__, __LINE__)) ) )

Definition at line 386 of file memory.h.

Referenced by conflictsetCopy(), evalFunctionGradient(), evalFunctionValue(), exprgraphAddExpr(), exprgraphFindParentByOperator(), exprgraphNodeCreateExpr(), exprgraphNodeRemovePolynomialDuplicateChildren(), exprgraphNodeRemovePolynomialNullChildren(), exprgraphNodeSimplify(), exprsimplifyRemoveDuplicatePolynomialChildren(), exprsimplifyRemovePolynomialNullChildren(), exprsimplifyRemovePolynomialUnusedChildren(), exprsimplifySeparateLinearFromPolynomial(), exprUnconvertPolynomial(), hessLagAddExprtree(), hessLagSparsitySetNzFlagForExprtree(), lpistateCreate(), nlpCalcFracVars(), polynomialdataCopy(), polynomialdataCreate(), printFunction(), SCIPboolarrayExtend(), SCIPcliquetableAdd(), SCIPcolCreate(), SCIPexprCopyDeep(), SCIPexprCreate(), SCIPexprCreateLinear(), SCIPexprCreateMonomial(), SCIPexprgraphAddExprtreeSum(), SCIPexprgraphCreateNodeLinear(), SCIPexprgraphGetSeparableTrees(), SCIPexprgraphGetSumTrees(), SCIPexprgraphGetTree(), SCIPexprgraphNodeSplitOffLinear(), SCIPexprgraphReplaceVarByLinearSum(), SCIPexprtreeCreate(), SCIPexprtreeRemoveFixedVars(), SCIPintarrayExtend(), SCIPlpiGetNorms(), SCIPnlpiOracleAddVars(), SCIPnlpiOracleEvalJacobian(), SCIPnlpiOracleGetHessianLagSparsity(), SCIPnlpiOracleGetJacobianSparsity(), SCIPptrarrayExtend(), SCIPrealarrayExtend(), SCIProwCreate(), and SCIPvaluehistoryCreate().

#define BMSreallocBlockMemoryArray (   mem,
  ptr,
  oldnum,
  newnum 
)
Value:
( ( ((size_t)(newnum)) > UINT_MAX / sizeof(**(ptr)) ) \
? ( ASSIGN((ptr), NULL) ) \
: ( ASSIGN((ptr), BMSreallocBlockMemory_call((mem), (void*)(*(ptr)), \
(oldnum)*sizeof(**(ptr)), (newnum)*sizeof(**(ptr)), __FILE__, \
__LINE__)) ) )

Definition at line 390 of file memory.h.

Referenced by cliqueEnsureSize(), cliquelistEnsureSize(), colEnsureSize(), conflictsetEnsureBdchginfosMem(), conssetchgEnsureAddedconssSize(), conssetchgEnsureDisabledconssSize(), domchgEnsureBoundchgsSize(), domchgEnsureHolechgsSize(), ensureConsLinSize(), ensureConsQuadSize(), ensureConssSize(), ensureIntArraySize(), ensureVarsSize(), eventfilterEnsureMem(), exprgraphNodeAddChildren(), exprgraphNodeRemovePolynomialNullChildren(), exprsimplifyAddChildren(), exprsimplifyFlattenPolynomials(), exprsimplifyRemovePolynomialNullChildren(), implicsEnsureSize(), monomialdataEnsureFactorsSize(), nlpCalcFracVars(), nlpEnsureNlRowsSolverSize(), nlpEnsureVarsSolverSize(), SCIPdomchgMakeStatic(), SCIPexprAddToLinear(), SCIPexprgraphNodeSplitOffLinear(), SCIPexprtreeAddVars(), SCIPexprtreeRemoveFixedVars(), SCIPexprtreeSetParams(), SCIPexprtreeSetVars(), SCIPnlpEnsureNlRowsSize(), SCIPnlpEnsureVarsSize(), SCIPnlpiOracleGetJacobianSparsity(), SCIPnlrowEnsureLinearSize(), SCIPnlrowEnsureQuadElementsSize(), SCIPnlrowEnsureQuadVarsSize(), SCIProwEnsureSize(), SCIPvaluehistoryFind(), SCIPvarFlattenAggregationGraph(), SCIPvarMultiaggregate(), varEnsureLbchginfosSize(), varEnsureParentvarsSize(), varEnsureUbchginfosSize(), and vboundsEnsureSize().

#define BMScreateBlockMemory (   csz,
  gbf 
)    BMScreateBlockMemory_call( (csz), (gbf), __FILE__, __LINE__ )

Definition at line 398 of file memory.h.

Referenced by SCIPmemCreate().

#define BMSclearBlockMemory (   mem)    BMSclearBlockMemory_call( (mem), __FILE__, __LINE__ )

Definition at line 399 of file memory.h.

#define BMSclearBlockMemoryNull (   mem)    { if( (mem) != NULL ) BMSclearBlockMemory( (mem) ); }

Definition at line 400 of file memory.h.

#define BMSdestroyBlockMemory (   mem)    BMSdestroyBlockMemory_call( (mem), __FILE__, __LINE__ )

Definition at line 401 of file memory.h.

Referenced by SCIPmemFree().

#define BMSdestroyBlockMemoryNull (   mem)    { if( *(mem) != NULL ) BMSdestroyBlockMemory( (mem) ); }

Definition at line 402 of file memory.h.

#define BMSallocBlockMemory (   mem,
  ptr 
)
Value:
ASSIGN((ptr), BMSallocBlockMemory_call((mem), sizeof(**(ptr)), \
__FILE__, __LINE__))

Definition at line 404 of file memory.h.

Referenced by btnodeCreateEmpty(), cliqueCreateWithData(), cliquelistCreate(), colStoreSolVals(), conflictsetCopy(), conflictsetCreate(), conssetchgCreate(), createConstraint(), cutCreate(), exprCreate(), exprgraphCreateNode(), exprUnconvertPolynomial(), forkCreate(), hashmaplistAppend(), hashtablelistAppend(), holelistCreate(), implicsCreate(), lpistateCreate(), nodeCreate(), paramCreate(), polynomialdataCreate(), probingnodeCreate(), pseudoforkCreate(), quadraticdataCreate(), rowStoreSolVals(), SCIPbdchginfoCreate(), SCIPboolarrayCreate(), SCIPcolCreate(), SCIPconsCreate(), SCIPeventCreateGholeAdded(), SCIPeventCreateGholeRemoved(), SCIPeventCreateGlbChanged(), SCIPeventCreateGubChanged(), SCIPeventCreateImplAdded(), SCIPeventCreateLbChanged(), SCIPeventCreateLholeAdded(), SCIPeventCreateLholeRemoved(), SCIPeventCreateObjChanged(), SCIPeventCreateRowAddedLP(), SCIPeventCreateRowAddedSepa(), SCIPeventCreateRowCoefChanged(), SCIPeventCreateRowConstChanged(), SCIPeventCreateRowDeletedLP(), SCIPeventCreateRowDeletedSepa(), SCIPeventCreateRowSideChanged(), SCIPeventCreateUbChanged(), SCIPeventCreateVarAdded(), SCIPeventCreateVarDeleted(), SCIPeventCreateVarFixed(), SCIPeventCreateVarUnlocked(), SCIPeventfilterCreate(), SCIPexprCreateMonomial(), SCIPexprgraphCreate(), SCIPexprtreeCreate(), SCIPhistoryCreate(), SCIPintarrayCreate(), SCIPlpiGetNorms(), SCIPlpiGetState(), SCIPnlrowCreate(), SCIPptrarrayCreate(), SCIPrealarrayCreate(), SCIProwCreate(), SCIPsolCopy(), SCIPsolCreate(), SCIPsolCreateOriginal(), SCIPsolCreateUnknown(), SCIPvaluehistoryCreate(), varCreate(), and vboundsCreate().

#define BMSallocBlockMemorySize (   mem,
  ptr,
  size 
)
Value:
ASSIGN((ptr), BMSallocBlockMemory_call((mem), (size_t)(size), \
__FILE__, __LINE__))

Definition at line 406 of file memory.h.

Referenced by domchgCreate().

#define BMSreallocBlockMemorySize (   mem,
  ptr,
  oldsize,
  newsize 
)
Value:
ASSIGN((ptr), BMSreallocBlockMemory_call((mem), (void*)(*(ptr)), \
(size_t)(oldsize), (size_t)(newsize), __FILE__, __LINE__))

Definition at line 408 of file memory.h.

Referenced by domchgMakeDynamic(), SCIPdomchgMakeStatic(), and SCIPensureBlockMemoryArray_call().

#define BMSduplicateBlockMemory (   mem,
  ptr,
  source 
)
Value:
ASSIGN((ptr), BMSduplicateBlockMemory_call((mem), (const void*)(source), \
sizeof(**(ptr)), __FILE__, __LINE__ ))

Definition at line 411 of file memory.h.

Referenced by polynomialdataCopy(), SCIPexprCopyDeep(), and SCIPexprtreeCopy().

#define BMSfreeBlockMemoryNull (   mem,
  ptr 
)    { if( *(ptr) != NULL ) BMSfreeBlockMemory( (mem), (ptr) ); }

Definition at line 420 of file memory.h.

Referenced by colRestoreSolVals(), rowRestoreSolVals(), SCIPcolFree(), and SCIProwFree().

#define BMSfreeBlockMemoryArray (   mem,
  ptr,
  num 
)
Value:
{ BMSfreeBlockMemory_call( (mem), (void*)(*(ptr)), (num)*sizeof(**(ptr)), \
__FILE__, __LINE__ ); \
*(ptr) = NULL; }

Definition at line 421 of file memory.h.

Referenced by evalFunctionGradient(), evalFunctionValue(), exprgraphAddExpr(), exprgraphFindParentByOperator(), exprgraphNodeRemovePolynomialDuplicateChildren(), exprgraphNodeRemovePolynomialNullChildren(), exprgraphNodeSimplify(), exprsimplifyFlattenPolynomials(), exprsimplifyRemoveDuplicatePolynomialChildren(), exprsimplifyRemovePolynomialNullChildren(), exprsimplifyRemovePolynomialUnusedChildren(), exprsimplifySeparateLinearFromPolynomial(), freeVariables(), hessLagAddExprtree(), hessLagSparsitySetNzFlagForExprtree(), invalidateHessianLagSparsity(), invalidateJacobiSparsity(), lpistateFree(), nlrowRemoveFixedQuadVars(), polynomialdataFree(), printFunction(), SCIP_DECL_EXPRFREEDATA(), SCIPcliquetableAdd(), SCIPconsChgName(), SCIPconsFree(), SCIPexprFreeDeep(), SCIPexprFreeMonomial(), SCIPexprgraphAddExprtreeSum(), SCIPexprgraphFree(), SCIPexprgraphGetSeparableTrees(), SCIPexprgraphGetSumTrees(), SCIPexprgraphGetTree(), SCIPexprgraphNodeSplitOffLinear(), SCIPexprtreeRemoveFixedVars(), SCIPlpiFreeNorms(), SCIPlpiGetNorms(), SCIPnlpFree(), SCIPnlpiOracleChgExprtree(), SCIPnlpiOracleDelVarSet(), SCIPnlpiOracleEvalJacobian(), SCIPnlpiOracleGetHessianLagSparsity(), SCIPnlpiOracleGetJacobianSparsity(), SCIPnlpiOracleSetProblemName(), SCIPnlrowFree(), SCIProwFree(), SCIPvaluehistoryFree(), SCIPvarChgName(), SCIPvarMultiaggregate(), and varFree().

#define BMSfreeBlockMemorySize (   mem,
  ptr,
  size 
)
Value:
{ BMSfreeBlockMemory_call( (mem), (void*)(*(ptr)), (size_t)(size), \
__FILE__, __LINE__ ); \
*(ptr) = NULL; }

Definition at line 425 of file memory.h.

Referenced by SCIPdomchgFree().

#define BMSfreeBlockMemorySizeNull (   mem,
  ptr,
  size 
)    { if( *(ptr) != NULL ) BMSfreeBlockMemorySize( (mem), (ptr), (size) ); }

Definition at line 428 of file memory.h.

#define BMSgarbagecollectBlockMemory (   mem)    BMSgarbagecollectBlockMemory_call(mem)

Definition at line 429 of file memory.h.

Referenced by SCIPtransformProb().

#define BMSgetBlockMemoryUsed (   mem)    BMSgetBlockMemoryUsed_call(mem)

Definition at line 430 of file memory.h.

Referenced by SCIPmemGetUsed().

#define BMSgetBlockPointerSize (   mem,
  ptr 
)    BMSgetBlockPointerSize_call((mem), (ptr))

Definition at line 431 of file memory.h.

#define BMSdisplayBlockMemory (   mem)    BMSdisplayBlockMemory_call(mem)

Definition at line 432 of file memory.h.

Referenced by SCIPprintMemoryDiagnostic().

#define BMSblockMemoryCheckEmpty (   mem)    BMScheckEmptyBlockMemory_call(mem)

Definition at line 433 of file memory.h.

Typedef Documentation

typedef struct BMS_ChkMem BMS_CHKMEM

collection of memory chunks of the same element size

Definition at line 240 of file memory.h.

typedef struct BMS_BlkMem BMS_BLKMEM

block memory: collection of chunk blocks

Definition at line 371 of file memory.h.

Function Documentation

void* BMSallocClearMemory_call ( size_t  num,
size_t  size,
const char *  filename,
int  line 
)

allocates memory and initializes it with 0; returns NULL if memory allocation failed

Parameters
numnumber of memory element to allocate
sizesize of one memory element to allocate
filenamesource file where the allocation is performed
lineline number in source file where the allocation is performed

Definition at line 280 of file memory.c.

References debugMessage, MAX, NULL, printError, and printErrorHeader.

void* BMSallocMemory_call ( size_t  size,
const char *  filename,
int  line 
)

allocates memory; returns NULL if memory allocation failed

Parameters
sizesize of memory element to allocate
filenamesource file where the allocation is performed
lineline number in source file where the allocation is performed

Definition at line 309 of file memory.c.

References debugMessage, MAX, NULL, printError, and printErrorHeader.

Referenced by BMSduplicateMemory_call().

void* BMSreallocMemory_call ( void *  ptr,
size_t  size,
const char *  filename,
int  line 
)

allocates memory; returns NULL if memory allocation failed

Parameters
ptrpointer to memory to reallocate
sizenew size of memory element
filenamesource file where the reallocation is performed
lineline number in source file where the reallocation is performed

Definition at line 336 of file memory.c.

References MAX, NULL, printError, and printErrorHeader.

void BMSclearMemory_call ( void *  ptr,
size_t  size 
)

clears a memory element (i.e. fills it with zeros)

Parameters
ptrpointer to memory element
sizesize of memory element

Definition at line 369 of file memory.c.

References NULL.

void BMScopyMemory_call ( void *  ptr,
const void *  source,
size_t  size 
)

copies the contents of one memory element into another memory element

Parameters
ptrpointer to target memory element
sourcepointer to source memory element
sizesize of memory element to copy

Definition at line 382 of file memory.c.

References NULL.

Referenced by BMSduplicateMemory_call().

void BMSmoveMemory_call ( void *  ptr,
const void *  source,
size_t  size 
)

moves the contents of one memory element into another memory element, should be used if both elements overlap, otherwise BMScopyMemory is faster

Parameters
ptrpointer to target memory element
sourcepointer to source memory element
sizesize of memory element to copy

Definition at line 399 of file memory.c.

References NULL.

void* BMSduplicateMemory_call ( const void *  source,
size_t  size,
const char *  filename,
int  line 
)

allocates memory and copies the contents of the given memory element into the new memory element

Parameters
sourcepointer to source memory element
sizesize of memory element to copy
filenamesource file where the duplication is performed
lineline number in source file where the duplication is performed

Definition at line 414 of file memory.c.

References BMSallocMemory_call(), BMScopyMemory_call(), and NULL.

void BMSfreeMemory_call ( void *  ptr,
const char *  filename,
int  line 
)

frees an allocated memory element

Parameters
ptrpointer to memory element
filenamesource file where the deallocation is performed
lineline number in source file where the deallocation is performed

Definition at line 433 of file memory.c.

References NULL, printError, and printErrorHeader.

size_t BMSgetPointerSize_call ( const void *  ptr)

returns the size of an allocated memory element

Parameters
ptrpointer to allocated memory

Definition at line 242 of file memory.c.

void BMSdisplayMemory_call ( void  )

outputs information about currently allocated memory to the screen

Definition at line 250 of file memory.c.

References printInfo.

void BMScheckEmptyMemory_call ( void  )

displays a warning message on the screen, if allocated memory exists

Definition at line 260 of file memory.c.

References printInfo.

long long BMSgetMemoryUsed_call ( void  )

returns total number of allocated bytes

Definition at line 270 of file memory.c.

void BMSalignMemsize ( size_t *  size)

aligns the given byte size corresponding to the minimal alignment for chunk and block memory

Parameters
sizepointer to the size to align

Definition at line 535 of file memory.c.

References ALIGNMENT, and alignSize().

int BMSisAligned ( size_t  size)

checks whether the given size meets the alignment conditions for chunk and block memory

Parameters
sizesize to check for alignment

Definition at line 544 of file memory.c.

References ALIGNMENT.

Referenced by createChkmem(), createChunk(), and getHashNumber().

BMS_CHKMEM* BMScreateChunkMemory_call ( size_t  size,
int  initchunksize,
int  garbagefactor,
const char *  filename,
int  line 
)

creates a new chunk block data structure

Parameters
sizeelement size of the chunk block
initchunksizenumber of elements in the first chunk of the chunk block
garbagefactorgarbage collector is called, if at least garbagefactor * avg. chunksize elements are free (-1: disable garbage collection)
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1283 of file memory.c.

References alignSize(), createChkmem(), debugMessage, NULL, printError, and printErrorHeader.

void BMSclearChunkMemory_call ( BMS_CHKMEM chkmem,
const char *  filename,
int  line 
)

clears a chunk block data structure

Parameters
chkmemchunk block
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1307 of file memory.c.

References clearChkmem(), debugMessage, NULL, printError, and printErrorHeader.

void BMSdestroyChunkMemory_call ( BMS_CHKMEM **  chkmem,
const char *  filename,
int  line 
)

destroys and frees a chunk block data structure

Parameters
chkmempointer to chunk block
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1325 of file memory.c.

References debugMessage, destroyChkmem(), NULL, printError, and printErrorHeader.

void* BMSallocChunkMemory_call ( BMS_CHKMEM chkmem,
size_t  size,
const char *  filename,
int  line 
)

allocates a memory element of the given chunk block

Parameters
chkmemchunk block
sizesize of memory element to allocate (only needed for sanity check)
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1345 of file memory.c.

References allocChkmemElement(), checkChkmem, debugMessage, NULL, printError, and printErrorHeader.

Referenced by BMSduplicateChunkMemory_call().

void* BMSduplicateChunkMemory_call ( BMS_CHKMEM chkmem,
const void *  source,
size_t  size,
const char *  filename,
int  line 
)

duplicates a given memory element by allocating a new element of the same chunk block and copying the data

Parameters
chkmemchunk block
sourcesource memory element
sizesize of memory element to allocate (only needed for sanity check)
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1372 of file memory.c.

References BMSallocChunkMemory_call(), BMScopyMemorySize, and NULL.

void BMSfreeChunkMemory_call ( BMS_CHKMEM chkmem,
void *  ptr,
size_t  size,
const char *  filename,
int  line 
)

frees a memory element of the given chunk block

Parameters
chkmemchunk block
ptrmemory element to free
sizesize of memory element to allocate (only needed for sanity check)
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1394 of file memory.c.

References checkChkmem, debugMessage, freeChkmemElement(), NULL, printError, and printErrorHeader.

void BMSgarbagecollectChunkMemory_call ( BMS_CHKMEM chkmem)

calls garbage collection of chunk block and frees chunks without allocated memory elements

Parameters
chkmemchunk block

Definition at line 1421 of file memory.c.

References debugMessage, and garbagecollectChkmem().

long long BMSgetChunkMemoryUsed_call ( const BMS_CHKMEM chkmem)

returns the number of allocated bytes in the chunk block

Parameters
chkmemchunk block

Definition at line 1431 of file memory.c.

References NULL.

BMS_BLKMEM* BMScreateBlockMemory_call ( int  initchunksize,
int  garbagefactor,
const char *  filename,
int  line 
)

creates a block memory allocation data structure

Parameters
initchunksizenumber of elements in the first chunk of each chunk block
garbagefactorgarbage collector is called, if at least garbagefactor * avg. chunksize elements are free (-1: disable garbage collection)
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1539 of file memory.c.

References BMSallocMemory, CHKHASH_SIZE, NULL, printError, and printErrorHeader.

void BMSclearBlockMemory_call ( BMS_BLKMEM blkmem,
const char *  filename,
int  line 
)

frees all chunk blocks in the block memory

Parameters
blkmemblock memory
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1569 of file memory.c.

References CHKHASH_SIZE, destroyChkmem(), NULL, printError, and printErrorHeader.

Referenced by BMSdestroyBlockMemory_call().

void BMSdestroyBlockMemory_call ( BMS_BLKMEM **  blkmem,
const char *  filename,
int  line 
)

clears and deletes block memory

Parameters
blkmempointer to block memory
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1602 of file memory.c.

References BMSclearBlockMemory_call(), BMSfreeMemory, NULL, printError, and printErrorHeader.

void* BMSallocBlockMemory_call ( BMS_BLKMEM blkmem,
size_t  size,
const char *  filename,
int  line 
)

allocates memory in the block memory pool

Parameters
blkmemblock memory
sizesize of memory element to allocate
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1624 of file memory.c.

References alignSize(), allocChkmemElement(), BMSduplicateMemoryArray, checkBlkmem, createChkmem(), debugMessage, getHashNumber(), NULL, printError, and printErrorHeader.

Referenced by BMSduplicateBlockMemory_call(), and BMSreallocBlockMemory_call().

void* BMSreallocBlockMemory_call ( BMS_BLKMEM blkmem,
void *  ptr,
size_t  oldsize,
size_t  newsize,
const char *  filename,
int  line 
)

resizes memory element in the block memory pool, and copies the data

Parameters
blkmemblock memory
ptrmemory element to reallocated
oldsizeold size of memory element
newsizenew size of memory element
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1679 of file memory.c.

References alignSize(), BMSallocBlockMemory_call(), BMScopyMemorySize, BMSfreeBlockMemory_call(), MIN, and NULL.

void* BMSduplicateBlockMemory_call ( BMS_BLKMEM blkmem,
const void *  source,
size_t  size,
const char *  filename,
int  line 
)

duplicates memory element in the block memory pool, and copies the data

Parameters
blkmemblock memory
sourcememory element to duplicate
sizesize of memory elements
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1710 of file memory.c.

References BMSallocBlockMemory_call(), BMScopyMemorySize, and NULL.

void BMSfreeBlockMemory_call ( BMS_BLKMEM blkmem,
void *  ptr,
size_t  size,
const char *  filename,
int  line 
)

frees memory element in the block memory pool

Parameters
blkmemblock memory
ptrmemory element to free
sizesize of memory element
filenamesource file of the function call
lineline number in source file of the function call

Definition at line 1730 of file memory.c.

References alignSize(), checkBlkmem, debugMessage, freeChkmemElement(), getHashNumber(), NULL, printError, and printErrorHeader.

Referenced by BMSreallocBlockMemory_call().

void BMSgarbagecollectBlockMemory_call ( BMS_BLKMEM blkmem)

calls garbage collection of block memory, frees chunks without allocated memory elements, and frees chunk blocks without any chunks

Parameters
blkmemblock memory

Definition at line 1783 of file memory.c.

References CHKHASH_SIZE, destroyChkmem(), garbagecollectChkmem(), and NULL.

long long BMSgetBlockMemoryUsed_call ( const BMS_BLKMEM blkmem)

returns the number of allocated bytes in the block memory

Parameters
blkmemblock memory

Definition at line 1814 of file memory.c.

References NULL.

size_t BMSgetBlockPointerSize_call ( const BMS_BLKMEM blkmem,
const void *  ptr 
)

returns the size of the given memory element; returns 0, if the element is not member of the block memory

Parameters
blkmemblock memory
ptrmemory element

Definition at line 1824 of file memory.c.

References findChkmem(), and NULL.

void BMSdisplayBlockMemory_call ( const BMS_BLKMEM blkmem)

outputs allocation diagnostics of block memory

Parameters
blkmemblock memory

Definition at line 1844 of file memory.c.

References CHKHASH_SIZE, NULL, and printInfo.

void BMScheckEmptyBlockMemory_call ( const BMS_BLKMEM blkmem)

outputs warning messages, if there are allocated elements in the block memory

Parameters
blkmemblock memory

Definition at line 1967 of file memory.c.

References CHKHASH_SIZE, NULL, and printInfo.