25 #ifndef __BMS_MEMORY_H__ 26 #define __BMS_MEMORY_H__ 37 template<
typename T> T* docast(T*,
void *v);
38 template<
typename T> T* docast(T*,
void *v) {
return reinterpret_cast<T*
>(v); }
41 #if __cplusplus > 199711L 42 #include <type_traits> 45 template<
typename T1,
typename T2> T1* docastcheck(T1* v1,
void* v, T2* v2)
47 typedef typename std::remove_const<T1>::type t1;
48 typedef typename std::remove_const<T2>::type t2;
49 static_assert(std::is_same<t1, t2>(),
"need equal types");
50 return reinterpret_cast<T1*
>(v);
54 template<
typename T1,
typename T2> T1* docastcheck(T1* v1,
void* v, T2* v2) {
return reinterpret_cast<T1*
>(v); }
60 #define ASSIGN(pointerstarstar, voidstarfunction) (*(pointerstarstar) = docast(*(pointerstarstar), (voidstarfunction))) 61 #define ASSIGNCHECK(pointerstarstar, voidstarfunction, origpointer) (*(pointerstarstar) = docastcheck(*(pointerstarstar), (voidstarfunction), (origpointer))) 65 #define ASSIGN(pointerstarstar, voidstarfunction) (*(pointerstarstar) = (voidstarfunction)) 66 #define ASSIGNCHECK(pointerstarstar, voidstarfunction, origpointer) (*(pointerstarstar) = (voidstarfunction)) 75 #if defined(_WIN32) || defined(_WIN64) 76 #define EXTERN __declspec(dllexport) 85 #define SCIP_UNUSED(x) ((void) (x)) 101 #define BMSallocMemory(ptr) ASSIGN((ptr), BMSallocMemory_call( sizeof(**(ptr)), __FILE__, __LINE__ )) 102 #define BMSallocMemorySize(ptr,size) ASSIGN((ptr), BMSallocMemory_call( (size_t)(ptrdiff_t)(size), __FILE__, __LINE__ )) 103 #define BMSallocMemoryCPP(size) BMSallocMemory_call( (size_t)(ptrdiff_t)(size), __FILE__, __LINE__ ) 104 #define BMSallocClearMemorySize(ptr,size) ASSIGN((ptr), BMSallocClearMemory_call((size_t)(1), (size_t)(ptrdiff_t)(size), __FILE__, __LINE__ )) 105 #define BMSallocMemoryArray(ptr,num) ASSIGN((ptr), BMSallocMemoryArray_call((size_t)(ptrdiff_t)(num), sizeof(**(ptr)), __FILE__, __LINE__ )) 106 #define BMSallocMemoryArrayCPP(num,size) BMSallocMemoryArray_call( (size_t)(ptrdiff_t)(num), (size_t)(ptrdiff_t)(size), __FILE__, __LINE__ ) 107 #define BMSallocClearMemoryArray(ptr,num) ASSIGN((ptr), BMSallocClearMemory_call((size_t)(ptrdiff_t)(num), sizeof(**(ptr)), __FILE__, __LINE__ )) 108 #define BMSreallocMemorySize(ptr,size) ASSIGN((ptr), BMSreallocMemory_call((void*)(*(ptr)), (size_t)(ptrdiff_t)(size), __FILE__, __LINE__ )) 109 #define BMSreallocMemoryArray(ptr,num) ASSIGN((ptr), BMSreallocMemoryArray_call( *(ptr), (size_t)(ptrdiff_t)(num), sizeof(**(ptr)), __FILE__, __LINE__ )) 111 #define BMSclearMemory(ptr) BMSclearMemory_call( (void*)(ptr), sizeof(*(ptr)) ) 112 #define BMSclearMemoryArray(ptr, num) BMSclearMemory_call( (void*)(ptr), (size_t)(ptrdiff_t)(num)*sizeof(*(ptr)) ) 113 #define BMSclearMemorySize(ptr, size) BMSclearMemory_call( (void*)(ptr), (size_t)(ptrdiff_t)(size) ) 115 #define BMScopyMemory(ptr, source) BMScopyMemory_call( (void*)(ptr), (const void*)(source), sizeof(*(ptr)) ) 116 #define BMScopyMemoryArray(ptr, source, num) BMScopyMemory_call( (void*)(ptr), (const void*)(source), (size_t)(ptrdiff_t)(num)*sizeof(*(ptr)) ) 117 #define BMScopyMemorySize(ptr, source, size) BMScopyMemory_call( (void*)(ptr), (const void*)(source), (size_t)(ptrdiff_t)(size) ) 119 #define BMSmoveMemory(ptr, source) BMSmoveMemory_call( (void*)(ptr), (const void*)(source), sizeof(*(ptr)) ) 120 #define BMSmoveMemoryArray(ptr, source, num) BMSmoveMemory_call( (void*)(ptr), (const void*)(source), (size_t)(ptrdiff_t)(num) * sizeof(*(ptr)) ) 121 #define BMSmoveMemorySize(ptr, source, size) BMSmoveMemory_call( (void*)(ptr), (const void*)(source), (size_t)(ptrdiff_t)(size) ) 123 #define BMSduplicateMemory(ptr, source) ASSIGN((ptr), BMSduplicateMemory_call( (const void*)(source), sizeof(**(ptr)), __FILE__, __LINE__ )) 124 #define BMSduplicateMemorySize(ptr, source, size) ASSIGN((ptr), BMSduplicateMemory_call( (const void*)(source), (size_t)(ptrdiff_t)(size), __FILE__, __LINE__ )) 125 #define BMSduplicateMemoryArray(ptr, source, num) ASSIGNCHECK((ptr), BMSduplicateMemoryArray_call( (const void*)(source), (size_t)(ptrdiff_t)(num), \ 126 sizeof(**(ptr)), __FILE__, __LINE__ ), source) 127 #define BMSfreeMemory(ptr) BMSfreeMemory_call( (void**)(ptr), __FILE__, __LINE__ ) 128 #define BMSfreeMemoryNull(ptr) BMSfreeMemoryNull_call( (void**)(ptr), __FILE__, __LINE__ ) 129 #define BMSfreeMemoryArray(ptr) BMSfreeMemory_call( (void**)(ptr), __FILE__, __LINE__ ) 130 #define BMSfreeMemoryArrayNull(ptr) BMSfreeMemoryNull_call( (void**)(ptr), __FILE__, __LINE__ ) 131 #define BMSfreeMemorySize(ptr) BMSfreeMemory_call( (void**)(ptr), __FILE__, __LINE__ ) 132 #define BMSfreeMemorySizeNull(ptr) BMSfreeMemoryNull_call( (void**)(ptr), __FILE__, __LINE__ ) 135 #define BMSgetPointerSize(ptr) BMSgetPointerSize_call(ptr) 136 #define BMSdisplayMemory() BMSdisplayMemory_call() 137 #define BMScheckEmptyMemory() BMScheckEmptyMemory_call() 138 #define BMSgetMemoryUsed() BMSgetMemoryUsed_call() 140 #define BMSgetPointerSize(ptr) 0 141 #define BMSdisplayMemory() 142 #define BMScheckEmptyMemory() 143 #define BMSgetMemoryUsed() 0LL 151 const char* filename,
159 const char* filename,
168 const char* filename,
177 const char* filename,
187 const char* filename,
221 const char* filename,
231 const char* filename,
239 const char* filename,
247 const char* filename,
287 #ifndef BMS_NOBLOCKMEM 289 #define BMScreateChunkMemory(sz,isz,gbf) BMScreateChunkMemory_call( (sz), (isz), (gbf), __FILE__, __LINE__ ) 290 #define BMSclearChunkMemory(mem) BMSclearChunkMemory_call( (mem), __FILE__, __LINE__ ) 291 #define BMSdestroyChunkMemory(mem) BMSdestroyChunkMemory_call( (mem), __FILE__, __LINE__ ) 293 #define BMSallocChunkMemory(mem,ptr) ASSIGN((ptr), BMSallocChunkMemory_call((mem), sizeof(**(ptr)), __FILE__, __LINE__)) 294 #define BMSduplicateChunkMemory(mem, ptr, source) ASSIGN((ptr), BMSduplicateChunkMemory_call((mem), (const void*)(source), \ 295 sizeof(**(ptr)), __FILE__, __LINE__ )) 296 #define BMSfreeChunkMemory(mem,ptr) BMSfreeChunkMemory_call( (mem), (void**)(ptr), sizeof(**(ptr)), __FILE__, __LINE__ ) 297 #define BMSfreeChunkMemoryNull(mem,ptr) BMSfreeChunkMemoryNull_call( (mem), (void**)(ptr) ) 298 #define BMSgarbagecollectChunkMemory(mem) BMSgarbagecollectChunkMemory_call(mem) 299 #define BMSgetChunkMemoryUsed(mem) BMSgetChunkMemoryUsed_call(mem) 305 #define BMScreateChunkMemory(sz,isz,gbf) (void*)(0x01) 306 #define BMSclearChunkMemory(mem) 307 #define BMSclearChunkMemoryNull(mem) 308 #define BMSdestroyChunkMemory(mem) 309 #define BMSdestroyChunkMemoryNull(mem) 310 #define BMSallocChunkMemory(mem,ptr) BMSallocMemory(ptr) 311 #define BMSduplicateChunkMemory(mem, ptr, source) BMSduplicateMemory(ptr,source) 312 #define BMSfreeChunkMemory(mem,ptr) BMSfreeMemory(ptr) 313 #define BMSfreeChunkMemoryNull(mem,ptr) BMSfreeMemoryNull(ptr) 314 #define BMSgarbagecollectChunkMemory(mem) 315 #define BMSgetChunkMemoryUsed(mem) 0LL 339 const char* filename,
347 const char* filename,
355 const char* filename,
364 const char* filename,
374 const char* filename,
384 const char* filename,
394 const char* filename,
421 #ifndef BMS_NOBLOCKMEM 429 #define BMScreateBlockMemory(csz,gbf) BMScreateBlockMemory_call( (csz), (gbf), __FILE__, __LINE__ ) 430 #define BMSclearBlockMemory(mem) BMSclearBlockMemory_call( (mem), __FILE__, __LINE__ ) 431 #define BMSdestroyBlockMemory(mem) BMSdestroyBlockMemory_call( (mem), __FILE__, __LINE__ ) 433 #define BMSallocBlockMemory(mem,ptr) ASSIGN((ptr), BMSallocBlockMemory_call((mem), sizeof(**(ptr)), __FILE__, __LINE__)) 434 #define BMSallocBlockMemorySize(mem,ptr,size) ASSIGN((ptr), BMSallocBlockMemory_call((mem), (size_t)(ptrdiff_t)(size), __FILE__, __LINE__)) 435 #define BMSallocBlockMemoryArray(mem,ptr,num) ASSIGN((ptr), BMSallocBlockMemoryArray_call((mem), (size_t)(ptrdiff_t)(num), sizeof(**(ptr)), __FILE__, __LINE__)) 436 #define BMSallocClearBlockMemoryArray(mem,ptr,num) ASSIGN((ptr), BMSallocClearBlockMemoryArray_call((mem), (size_t)(ptrdiff_t)(num), sizeof(**(ptr)), __FILE__, __LINE__)) 437 #define BMSreallocBlockMemorySize(mem,ptr,oldsize,newsize) ASSIGN((ptr), BMSreallocBlockMemory_call((mem), (void*)(*(ptr)), \ 438 (size_t)(ptrdiff_t)(oldsize), (size_t)(ptrdiff_t)(newsize), __FILE__, __LINE__)) 439 #define BMSreallocBlockMemoryArray(mem,ptr,oldnum,newnum) ASSIGN((ptr), BMSreallocBlockMemoryArray_call((mem), (void*)(*(ptr)), \ 440 (size_t)(ptrdiff_t)(oldnum), (size_t)(ptrdiff_t)(newnum), sizeof(**(ptr)), __FILE__, __LINE__)) 441 #define BMSduplicateBlockMemory(mem, ptr, source) ASSIGN((ptr), BMSduplicateBlockMemory_call((mem), (const void*)(source), \ 442 sizeof(**(ptr)), __FILE__, __LINE__ )) 443 #define BMSduplicateBlockMemoryArray(mem, ptr, source, num) ASSIGNCHECK((ptr), BMSduplicateBlockMemoryArray_call( (mem), (const void*)(source), \ 444 (size_t)(ptrdiff_t)(num), sizeof(**(ptr)), __FILE__, __LINE__ ), source) 446 #define BMSfreeBlockMemory(mem,ptr) BMSfreeBlockMemory_call( (mem), (void**)(ptr), sizeof(**(ptr)), __FILE__, __LINE__ ) 447 #define BMSfreeBlockMemoryNull(mem,ptr) BMSfreeBlockMemoryNull_call( (mem), (void**)(ptr), sizeof(**(ptr)), __FILE__, __LINE__ ) 448 #define BMSfreeBlockMemoryArray(mem,ptr,num) BMSfreeBlockMemory_call( (mem), (void**)(ptr), (num)*sizeof(**(ptr)), __FILE__, __LINE__ ) 449 #define BMSfreeBlockMemoryArrayNull(mem,ptr,num) BMSfreeBlockMemoryNull_call( (mem), (void**)(ptr), (num)*sizeof(**(ptr)), __FILE__, __LINE__ ) 450 #define BMSfreeBlockMemorySize(mem,ptr,size) BMSfreeBlockMemory_call( (mem), (void**)(ptr), (size_t)(ptrdiff_t)(size), __FILE__, __LINE__ ) 451 #define BMSfreeBlockMemorySizeNull(mem,ptr,size) BMSfreeBlockMemory_call( (mem), (void**)(ptr), (size_t)(ptrdiff_t)(size), __FILE__, __LINE__ ) 453 #define BMSgarbagecollectBlockMemory(mem) BMSgarbagecollectBlockMemory_call(mem) 454 #define BMSgetBlockMemoryAllocated(mem) BMSgetBlockMemoryAllocated_call(mem) 455 #define BMSgetBlockMemoryUsed(mem) BMSgetBlockMemoryUsed_call(mem) 456 #define BMSgetBlockMemoryUnused(mem) BMSgetBlockMemoryUnused_call(mem) 457 #define BMSgetBlockMemoryUsedMax(mem) BMSgetBlockMemoryUsedMax_call(mem) 458 #define BMSgetBlockMemoryUnusedMax(mem) BMSgetBlockMemoryUnusedMax_call(mem) 459 #define BMSgetBlockMemoryAllocatedMax(mem) BMSgetBlockMemoryAllocatedMax_call(mem) 460 #define BMSgetBlockPointerSize(mem,ptr) BMSgetBlockPointerSize_call((mem), (ptr)) 461 #define BMSdisplayBlockMemory(mem) BMSdisplayBlockMemory_call(mem) 462 #define BMSblockMemoryCheckEmpty(mem) BMScheckEmptyBlockMemory_call(mem) 468 #define BMScreateBlockMemory(csz,gbf) (SCIP_UNUSED(csz), SCIP_UNUSED(gbf), (void*)(0x01)) 469 #define BMSclearBlockMemory(mem) SCIP_UNUSED(mem) 470 #define BMSclearBlockMemoryNull(mem) SCIP_UNUSED(mem) 471 #define BMSdestroyBlockMemory(mem) SCIP_UNUSED(mem) 472 #define BMSdestroyBlockMemoryNull(mem) SCIP_UNUSED(mem) 473 #define BMSallocBlockMemory(mem,ptr) (SCIP_UNUSED(mem), BMSallocMemory(ptr)) 474 #define BMSallocBlockMemoryArray(mem,ptr,num) (SCIP_UNUSED(mem), BMSallocMemoryArray(ptr,num)) 475 #define BMSallocClearBlockMemoryArray(mem,ptr,num) (SCIP_UNUSED(mem), BMSallocClearMemoryArray(ptr,num)) 476 #define BMSallocBlockMemorySize(mem,ptr,size) (SCIP_UNUSED(mem), BMSallocMemorySize(ptr,size)) 477 #define BMSreallocBlockMemoryArray(mem,ptr,oldnum,newnum) (SCIP_UNUSED(mem), SCIP_UNUSED(oldnum), BMSreallocMemoryArray(ptr,newnum)) 478 #define BMSreallocBlockMemorySize(mem,ptr,oldsize,newsize) (SCIP_UNUSED(mem), SCIP_UNUSED(oldsize), BMSreallocMemorySize(ptr,newsize)) 479 #define BMSduplicateBlockMemory(mem, ptr, source) (SCIP_UNUSED(mem), BMSduplicateMemory(ptr,source)) 480 #define BMSduplicateBlockMemoryArray(mem, ptr, source, num) (SCIP_UNUSED(mem), BMSduplicateMemoryArray(ptr,source,num)) 481 #define BMSfreeBlockMemory(mem,ptr) (SCIP_UNUSED(mem), BMSfreeMemory(ptr)) 482 #define BMSfreeBlockMemoryNull(mem,ptr) (SCIP_UNUSED(mem), BMSfreeMemoryNull(ptr)) 483 #define BMSfreeBlockMemoryArray(mem,ptr,num) (SCIP_UNUSED(mem), SCIP_UNUSED(num), BMSfreeMemoryArray(ptr)) 484 #define BMSfreeBlockMemoryArrayNull(mem,ptr,num) (SCIP_UNUSED(mem), SCIP_UNUSED(num), BMSfreeMemoryArrayNull(ptr)) 485 #define BMSfreeBlockMemorySize(mem,ptr,size) (SCIP_UNUSED(mem), SCIP_UNUSED(size), BMSfreeMemory(ptr)) 486 #define BMSfreeBlockMemorySizeNull(mem,ptr,size) (SCIP_UNUSED(mem), SCIP_UNUSED(size), BMSfreeMemoryNull(ptr)) 487 #define BMSgarbagecollectBlockMemory(mem) SCIP_UNUSED(mem) 488 #define BMSgetBlockMemoryAllocated(mem) (SCIP_UNUSED(mem), 0LL) 489 #define BMSgetBlockMemoryUsed(mem) (SCIP_UNUSED(mem), 0LL) 490 #define BMSgetBlockMemoryUnused(mem) (SCIP_UNUSED(mem), 0LL) 491 #define BMSgetBlockMemoryUsedMax(mem) (SCIP_UNUSED(mem), 0LL) 492 #define BMSgetBlockMemoryUnusedMax(mem) (SCIP_UNUSED(mem), 0LL) 493 #define BMSgetBlockMemoryAllocatedMax(mem) (SCIP_UNUSED(mem), 0LL) 494 #define BMSgetBlockPointerSize(mem,ptr) (SCIP_UNUSED(mem), SCIP_UNUSED(ptr), 0) 495 #define BMSdisplayBlockMemory(mem) SCIP_UNUSED(mem) 496 #define BMSblockMemoryCheckEmpty(mem) (SCIP_UNUSED(mem), 0LL) 507 const char* filename,
515 const char* filename,
523 const char* filename,
532 const char* filename,
542 const char* filename,
552 const char* filename,
563 const char* filename,
575 const char* filename,
585 const char* filename,
596 const char* filename,
606 const char* filename,
616 const char* filename,
698 #define BMSallocBufferMemory(mem,ptr) ASSIGN((ptr), BMSallocBufferMemory_call((mem), sizeof(**(ptr)), __FILE__, __LINE__)) 699 #define BMSallocBufferMemorySize(mem,ptr,size) ASSIGN((ptr), BMSallocBufferMemory_call((mem), (size_t)(ptrdiff_t)(size), __FILE__, __LINE__)) 700 #define BMSreallocBufferMemorySize(mem,ptr,size) \ 701 ASSIGN((ptr), BMSreallocBufferMemory_call((mem), (void*)(*(ptr)), (size_t)(ptrdiff_t)(size), __FILE__, __LINE__)) 702 #define BMSallocBufferMemoryArray(mem,ptr,num) ASSIGN((ptr), BMSallocBufferMemoryArray_call((mem), (size_t)(ptrdiff_t)(num), sizeof(**(ptr)), __FILE__, __LINE__)) 703 #define BMSallocClearBufferMemoryArray(mem,ptr,num) ASSIGN((ptr), BMSallocClearBufferMemoryArray_call((mem), (size_t)(ptrdiff_t)(num), sizeof(**(ptr)), __FILE__, __LINE__)) 704 #define BMSreallocBufferMemoryArray(mem,ptr,num) ASSIGN((ptr), BMSreallocBufferMemoryArray_call((mem), (void*)(*(ptr)), (size_t)(ptrdiff_t)(num), \ 705 sizeof(**(ptr)), __FILE__, __LINE__)) 706 #define BMSduplicateBufferMemory(mem,ptr,source,size) \ 707 ASSIGN((ptr), BMSduplicateBufferMemory_call((mem), (const void*)(source), (size_t)(ptrdiff_t)(size), __FILE__, __LINE__)) 708 #define BMSduplicateBufferMemoryArray(mem,ptr,source,num) ASSIGNCHECK((ptr), BMSduplicateBufferMemoryArray_call((mem), \ 709 (const void*)(source), (size_t)(ptrdiff_t)(num), sizeof(**(ptr)), __FILE__, __LINE__), source) 711 #define BMSfreeBufferMemory(mem,ptr) BMSfreeBufferMemory_call((mem), (void**)(ptr), __FILE__, __LINE__) 712 #define BMSfreeBufferMemoryNull(mem,ptr) BMSfreeBufferMemoryNull_call((mem), (void**)(ptr), __FILE__, __LINE__) 713 #define BMSfreeBufferMemoryArray(mem,ptr) BMSfreeBufferMemory_call((mem), (void**)(ptr), __FILE__, __LINE__) 714 #define BMSfreeBufferMemoryArrayNull(mem,ptr) BMSfreeBufferMemoryNull_call((mem), (void**)(ptr), __FILE__, __LINE__) 715 #define BMSfreeBufferMemorySize(mem,ptr) BMSfreeBufferMemory_call((mem), (void**)(ptr), __FILE__, __LINE__); 716 #define BMSfreeBufferMemorySizeNull(mem,ptr) BMSfreeBufferMemoryNull_call((mem), (void**)(ptr), __FILE__, __LINE__) 718 #define BMScreateBufferMemory(fac,init,clean) BMScreateBufferMemory_call((fac), (init), (clean), __FILE__, __LINE__) 719 #define BMSdestroyBufferMemory(mem) BMSdestroyBufferMemory_call((mem), __FILE__, __LINE__) 728 const char* filename,
736 const char* filename,
759 const char* filename,
769 const char* filename,
779 const char* filename,
789 const char* filename,
800 const char* filename,
810 const char* filename,
821 const char* filename,
830 const char* filename,
839 const char* filename,
void * BMSreallocBufferMemory_call(BMS_BUFMEM *buffer, void *ptr, size_t size, const char *filename, int line)
void BMSfreeBufferMemoryNull_call(BMS_BUFMEM *buffer, void **ptr, const char *filename, int line)
void BMSdestroyChunkMemory_call(BMS_CHKMEM **chkmem, const char *filename, int line)
void * BMSallocBlockMemory_call(BMS_BLKMEM *blkmem, size_t size, const char *filename, int line)
struct BMS_ChkMem BMS_CHKMEM
BMS_CHKMEM * BMScreateChunkMemory_call(size_t size, int initchunksize, int garbagefactor, const char *filename, int line)
void BMSfreeMemoryNull_call(void **ptr, const char *filename, int line)
void * BMSallocChunkMemory_call(BMS_CHKMEM *chkmem, size_t size, const char *filename, int line)
void * BMSallocBlockMemoryArray_call(BMS_BLKMEM *blkmem, size_t num, size_t typesize, const char *filename, int line)
void * BMSallocClearBlockMemoryArray_call(BMS_BLKMEM *blkmem, size_t num, size_t typesize, const char *filename, int line)
void BMSclearBlockMemory_call(BMS_BLKMEM *blkmem, const char *filename, int line)
void * BMSallocBufferMemoryArray_call(BMS_BUFMEM *buffer, size_t num, size_t typesize, const char *filename, int line)
int BMSisAligned(size_t size)
void BMSdestroyBlockMemory_call(BMS_BLKMEM **blkmem, const char *filename, int line)
long long BMScheckEmptyBlockMemory_call(const BMS_BLKMEM *blkmem)
void * BMSreallocBlockMemoryArray_call(BMS_BLKMEM *blkmem, void *ptr, size_t oldnum, size_t newnum, size_t typesize, const char *filename, int line)
size_t BMSgetBlockPointerSize_call(const BMS_BLKMEM *blkmem, const void *ptr)
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)
long long BMSgetBlockMemoryUsedMax_call(const BMS_BLKMEM *blkmem)
long long BMSgetBlockMemoryAllocated_call(const BMS_BLKMEM *blkmem)
void * BMSallocBufferMemory_call(BMS_BUFMEM *buffer, size_t size, const char *filename, int line)
void BMSsetBufferMemoryArraygrowinit(BMS_BUFMEM *buffer, int arraygrowinit)
void * BMSallocClearBufferMemoryArray_call(BMS_BUFMEM *buffer, size_t num, size_t typesize, const char *filename, int line)
void * BMSduplicateMemory_call(const void *source, 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 * BMSreallocMemoryArray_call(void *ptr, size_t num, size_t typesize, const char *filename, int line)
void * BMSallocMemoryArray_call(size_t num, size_t typesize, const char *filename, int line)
void BMSdestroyBufferMemory_call(BMS_BUFMEM **buffer, const char *filename, int line)
void BMSdisplayMemory_call(void)
BMS_BLKMEM * BMScreateBlockMemory_call(int initchunksize, int garbagefactor, const char *filename, int line)
void BMSclearMemory_call(void *ptr, size_t size)
void BMSfreeBufferMemory_call(BMS_BUFMEM *buffer, void **ptr, const char *filename, int line)
void * BMSduplicateBlockMemory_call(BMS_BLKMEM *blkmem, const void *source, size_t size, const char *filename, int line)
void BMScheckEmptyMemory_call(void)
void BMSgarbagecollectChunkMemory_call(BMS_CHKMEM *chkmem)
void * BMSreallocMemory_call(void *ptr, size_t size, const char *filename, int line)
long long BMSgetBlockMemoryUsed_call(const BMS_BLKMEM *blkmem)
long long BMSgetBlockMemoryAllocatedMax_call(const BMS_BLKMEM *blkmem)
void * BMSduplicateBlockMemoryArray_call(BMS_BLKMEM *blkmem, const void *source, size_t num, size_t typesize, const char *filename, int line)
void BMSfreeBlockMemoryNull_call(BMS_BLKMEM *blkmem, void **ptr, size_t size, const char *filename, int line)
long long BMSgetChunkMemoryUsed_call(const BMS_CHKMEM *chkmem)
void BMSgarbagecollectBlockMemory_call(BMS_BLKMEM *blkmem)
void BMSprintBufferMemory(BMS_BUFMEM *buffer)
void * BMSallocMemory_call(size_t size, const char *filename, int line)
unsigned int arraygrowinit
void BMSfreeMemory_call(void **ptr, const char *filename, int line)
BMS_BUFMEM * BMScreateBufferMemory_call(double arraygrowfac, int arraygrowinit, unsigned int clean, const char *filename, int line)
void * BMSallocClearMemory_call(size_t num, size_t typesize, const char *filename, int line)
long long BMSgetBlockMemoryUnusedMax_call(const BMS_BLKMEM *blkmem)
void BMSsetBufferMemoryArraygrowfac(BMS_BUFMEM *buffer, double arraygrowfac)
void * BMSduplicateBufferMemory_call(BMS_BUFMEM *buffer, const void *source, size_t size, const char *filename, int line)
void BMSmoveMemory_call(void *ptr, const void *source, size_t size)
void * BMSreallocBufferMemoryArray_call(BMS_BUFMEM *buffer, void *ptr, size_t num, size_t typesize, const char *filename, int line)
void BMSfreeChunkMemoryNull_call(BMS_CHKMEM *chkmem, void **ptr, size_t size, const char *filename, int line)
long long BMSgetBlockMemoryUnused_call(const BMS_BLKMEM *blkmem)
size_t BMSgetNUsedBufferMemory(BMS_BUFMEM *buffer)
void BMSalignMemsize(size_t *size)
void BMScopyMemory_call(void *ptr, const void *source, size_t size)
void BMSfreeBlockMemory_call(BMS_BLKMEM *blkmem, void **ptr, size_t size, const char *filename, int line)
void BMSdisplayBlockMemory_call(const BMS_BLKMEM *blkmem)
void BMSclearChunkMemory_call(BMS_CHKMEM *chkmem, const char *filename, int line)
size_t BMSgetPointerSize_call(const void *ptr)
struct BMS_BlkMem BMS_BLKMEM
long long BMSgetMemoryUsed_call(void)
void * BMSduplicateMemoryArray_call(const void *source, size_t num, size_t typesize, const char *filename, int line)
long long BMSgetBufferMemoryUsed(const BMS_BUFMEM *bufmem)
void * BMSduplicateBufferMemoryArray_call(BMS_BUFMEM *buffer, const void *source, size_t num, size_t typesize, const char *filename, int line)