18#include "omalloc/omConfig.h" 
   21  #if __cplusplus >= 201402L 
   24  #elif defined(__clang__) 
   27  #define REGISTER register 
   30  #define REGISTER register 
   84#define omalloc(s) malloc(s) 
   85#define omAlloc(s) malloc(s) 
   88{ 
void *d=
malloc(
s);memset(d,0,
s); 
return d; }
 
   90{ 
if (
s!=0) { 
void *d=
malloc(
s);memset(d,0,
s); 
return d;} 
else return NULL; }
 
   98    if (ns>os) memset(
p+os,0,ns-os);
 
  103#define omfree(d) free(d) 
  104#define omFree(d) free(d) 
  105#define omFreeSize(d,s) free(d) 
  107#define omStrDup(s) strdup(s) 
  124#define omSizeWOfBin(bin_ptr) (((bin_ptr->size)+SIZEOF_LONG-1)/SIZEOF_LONG) 
  148  *((
void**) 
p) = 
b->curr;
 
  152#define omTypeAllocBin(T,P,B)    P=(T)omAllocBin(B) 
  153#define omTypeAlloc0Bin(T,P,B)   P=(T)omAlloc0Bin(B) 
  178#define omSizeWOfBin(bin_ptr) (((bin_ptr)+SIZEOF_LONG-1)/SIZEOF_LONG) 
  179#define omTypeAllocBin(T,P,B)    P=(T)omAlloc(B) 
  180#define omTypeAlloc0Bin(T,P,B)   P=(T)omAlloc0(B) 
  181#define omAllocBin(B)            omAlloc(B) 
  182#define omAlloc0Bin(B)           omAlloc0(B) 
  183#define omFreeBin(P,B)           omFree(P) 
  184#define omGetSpecBin(A)          (A) 
  185#define omUnGetSpecBin(A)        do {} while (0) 
  223#define omSizeWOfAddr(P)         (omSizeOfAddr(P)/SIZEOF_LONG) 
  225#define omTypeAlloc(T,P,S)       P=(T)omAlloc(S) 
  226#define omAlloc0Aligned(S)       omAlloc0(S) 
  227#define omAllocAligned(S)        omAlloc(S) 
  229#define omInitGetBackTrace() 
  230#define omUpdateInfo() 
  231#define omPrintStats(F) 
  232#define omPrintInfo(F) 
  233#define omPrintBinStats(F) 
  234#define omMarkMemoryAsStatic() 
  235#define omfreeSize(P,S)          free(P) 
  236#define omFreeFunc               free 
  237#define omFreeBinAddr(P)         free(P) 
  238#define omrealloc(A,NS)          realloc(A,NS) 
  239#define omreallocSize(A,OS,NS)   realloc(A,NS) 
  240#define omrealloc0Size(A,OS,NS)  omRealloc0Size(A,OS,NS) 
  241#define omRealloc(A,B)           realloc(A,B) 
  242#define omReallocAligned(A,B)    realloc(A,B) 
  243#define omReallocSize(A,B,C)     realloc(A,C) 
  244#define omReallocAlignedSize(A,B) realloc(A,B) 
  245#define omMarkAsStaticAddr(A) 
  246#define omMemcpyW(A,B,C)         memcpy(A,B,(C)*SIZEOF_LONG) 
  247#define omGetStickyBinOfBin(B)   (B) 
  251#define omTypeReallocAlignedSize     omTypeReallocSize 
  252#define omTypeRealloc0AlignedSize    omTypeRealloc0Size 
  253#define omRealloc0AlignedSize        omRealloc0Size 
  254#define omMemDupAligned              omMemDup 
  255#define omCheckIf(cond, test)                    do {} while (0) 
  256#define omCheckBinAddr(addr)                     do {} while (0) 
  257#define omCheckAddrBin(addr,bin)                 do {} while (0) 
  258#define omCheckBinAddrSize(addr,size)            do {} while (0) 
  259#define omCheckAddrSize(addr,size)               do {} while (0) 
  260#define omCheckAddr(addr)                        do {} while (0) 
  261#define omcheckAddrSize(addr,size)               do {} while (0) 
  262#define omcheckAddr(addr)                        do {} while (0) 
  263#define omCheckBin(bin)                          do {} while (0) 
  264#define omCheckMemory()                          do {} while (0) 
  265#define omPrintCurrentBackTraceMax(A,B)          do {} while (0) 
  266#define omPrintUsedTrackAddrs(F,max)             do {} while (0) 
  267#define omPrintCurrentBackTrace(F)               do {} while (0) 
  268#define omPrintUsedAddrs(F,max)                  do {} while (0) 
  269#define omdebugAddrSize(A,B)                     do {} while (0) 
  270#define omPrintAddrInfo(A,B,C)                   do {} while (0) 
  271#define omIsBinPageAddr(A)                       (1) 
  272#define omTestBinAddrSize(A,B,C)                 (omError_NoError) 
  273#define omTestList(ptr, level)                   (omError_NoError) 
  274#define omInitRet_2_Info(argv0)                  do {} while (0) 
  275#define omMergeStickyBinIntoBin(A,B)             do {} while (0) 
  282#undef OMALLOC_USES_MALLOC 
  284#define omMallocFunc malloc 
  285#define omFreeSizeFunc omFreeSize 
  286#define omReallocSizeFunc realloc 
const CanonicalForm int s
 
#define omFreeBin(addr, bin)
 
#define omRealloc0Size(addr, o_size, size)
 
#define omGetSpecBin(size)
 
#define omUnGetSpecBin(bin_ptr)
 
void(* MemoryLowFunc)(void)
 
void(* OutOfMemoryFunc)(void)
 
unsigned int PagesPerRegion
 
long CurrentBytesFromValloc
 
long CurrentBytesFromMalloc
 
omBin_next_t * omBin_next
 
@ omError_MemoryCorrupted
 
@ omError_FreedAddrOrMemoryCorrupted
 
@ omError_SortedListError
 
@ omError_KeptAddrListCorrupted
 
@ omError_InvalidRangeAddr
 
@ omError_FalseAddrOrMemoryCorrupted
 
long AvailBytesFromValloc