Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
xalloc.h File Reference
#include <stdlib.h>
#include <string.h>
#include "omalloc/omConfig.h"

Go to the source code of this file.

Data Structures

struct  omInfo_t
 
struct  omOpts_t
 

Macros

#define OM_NDEBUG   1
 
#define REGISTER   register
 
#define omReallocAligned(A, B)   omRealloc(A,B)
 
#define omSizeWOfBin(bin_ptr)   (((bin_ptr)+sizeof(long)-1)/sizeof(long))
 
#define omSizeWOfAddr(P)   (omSizeOfAddr(P)/sizeof(long))
 
#define omTypeAllocBin(T, P, B)   P=(T)omAlloc(B)
 
#define omTypeAlloc(T, P, S)   P=(T)omAlloc(S)
 
#define omTypeAlloc0Bin(T, P, B)   P=(T)omAlloc0(B)
 
#define omAlloc0Aligned(S)   omAlloc0(S)
 
#define omAllocAligned(S)   omAlloc(S)
 
#define omAllocBin(B)   omAlloc(B)
 
#define omAllocBin0(B)   omAlloc0(B)
 
#define omAlloc0Bin(B)   omAlloc0(B)
 
#define omInitInfo()
 
#define omInitGetBackTrace()
 
#define omUpdateInfo()
 
#define omPrintStats(F)
 
#define omPrintInfo(F)
 
#define omPrintBinStats(F)
 
#define omMarkMemoryAsStatic()
 
#define omfree(P)   omFree(P)
 
#define omFreeBin(P, B)   omFree(P)
 
#define omfreeSize(P, S)   omFreeSize(P,S)
 
#define omFreeFunc   omFree
 
#define omFreeBinAddr(P)   omFree(P)
 
#define omrealloc(A, NS)   omRealloc(A,NS)
 
#define omreallocSize(A, OS, NS)   omRealloc(A,NS)
 
#define omRealloc0Size(A, OS, NS)   omRealloc0(A,NS)
 
#define omrealloc0Size(A, OS, NS)   omRealloc(A,NS)
 
#define omMarkAsStaticAddr(A)
 
#define omMemCpyW(A, B, S)   memcpy(A,B,(S)<<2)
 
#define omMemcpyW(A, B, S)   memcpy(A,B,(S)<<2)
 
#define omGetSpecBin(A)   (A)
 
#define omUnGetSpecBin(A)   do {} while (0)
 
#define memcpyW(A, B, C)   memcpy(A,B,(C)*sizeof(long))
 
#define omGetStickyBinOfBin(B)   omGetSpecBin(B)
 
#define omTypeReallocAlignedSize   omTypeReallocSize
 
#define omTypeRealloc0AlignedSize   omTypeRealloc0Size
 
#define omReallocAlignedSize   omReallocSize
 
#define omRealloc0AlignedSize   omRealloc0Size
 
#define omMemDupAligned   omMemDup
 
#define omCheckIf(cond, test)   do {} while (0)
 
#define omCheckBinAddr(addr)   do {} while (0)
 
#define omCheckAddrBin(addr, bin)   do {} while (0)
 
#define omCheckBinAddrSize(addr, size)   do {} while (0)
 
#define omCheckAddrSize(addr, size)   do {} while (0)
 
#define omCheckAddr(addr)   do {} while (0)
 
#define omcheckAddrSize(addr, size)   do {} while (0)
 
#define omcheckAddr(addr)   do {} while (0)
 
#define omCheckBin(bin)   do {} while (0)
 
#define omCheckMemory()   do {} while (0)
 
#define omPrintCurrentBackTraceMax(A, B)   do {} while (0)
 
#define omPrintUsedTrackAddrs(F, max)   do {} while (0)
 
#define omPrintCurrentBackTrace(F)   do {} while (0)
 
#define omPrintUsedAddrs(F, max)   do {} while (0)
 
#define omdebugAddrSize(A, B)   do {} while (0)
 
#define omPrintAddrInfo(A, B, C)   do {} while (0)
 
#define omIsBinPageAddr(A)   (1)
 
#define omTestBinAddrSize(A, B, C)   (omError_NoError)
 
#define omTestList(ptr, level)   (omError_NoError)
 
#define omInitRet_2_Info(argv0)   do {} while (0)
 
#define omMergeStickyBinIntoBin(A, B)   do {} while (0)
 
#define X_OMALLOC
 
#define omMallocFunc   omAlloc
 
#define omReallocSizeFunc   omReallocSize
 
#define omFreeSizeFunc   omFreeSize
 

Typedefs

typedef size_t omBin
 

Enumerations

enum  omError_e {
  omError_NoError = 0, omError_Unknown, omError_InternalBug, omError_MemoryCorrupted,
  omError_NullAddr, omError_InvalidRangeAddr, omError_FalseAddr, omError_FalseAddrOrMemoryCorrupted,
  omError_WrongSize, omError_FreedAddr, omError_FreedAddrOrMemoryCorrupted, omError_WrongBin,
  omError_UnknownBin, omError_NotBinAddr, omError_UnalignedAddr, omError_NullSizeAlloc,
  omError_ListCycleError, omError_SortedListError, omError_KeptAddrListCorrupted, omError_FreePattern,
  omError_BackPattern, omError_FrontPattern, omError_NotString, omError_StickyBin,
  omError_MaxError, omError_NoError = 0, omError_Unknown, omError_InternalBug,
  omError_MemoryCorrupted, omError_NullAddr, omError_InvalidRangeAddr, omError_FalseAddr,
  omError_FalseAddrOrMemoryCorrupted, omError_WrongSize, omError_FreedAddr, omError_FreedAddrOrMemoryCorrupted,
  omError_WrongBin, omError_UnknownBin, omError_NotBinAddr, omError_UnalignedAddr,
  omError_NullSizeAlloc, omError_ListCycleError, omError_SortedListError, omError_KeptAddrListCorrupted,
  omError_FreePattern, omError_BackPattern, omError_FrontPattern, omError_NotString,
  omError_StickyBin, omError_MaxError
}
 

Functions

static void * omalloc (size_t s)
 
static void * omAlloc (size_t s)
 
static void * omAlloc0 (size_t s)
 
static void * omalloc0 (size_t s)
 
static void * omRealloc (void *d, size_t ns)
 
static void * omReallocSize (void *d, __attribute__((unused)) size_t os, size_t ns)
 
static long omSizeOfAddr (void *d)
 
static void omFree (void *d)
 
static void * omRealloc0 (void *d, size_t ns)
 
static void omFreeSize (void *d, __attribute__((unused)) size_t s)
 
static char * omStrDup (const char *s)
 
static void * omMemDup (void *s)
 

Variables

struct omInfo_s om_Info
 
struct omOpts_s om_Opts
 
int om_sing_opt_show_mem
 

Data Structure Documentation

◆ omInfo_s

struct omInfo_s

Definition at line 10 of file omStats.h.

Data Fields
long AvailBytes
long AvailBytesFromValloc
long AvailBytesMalloc
long AvailPages
long CurrentBytesFromMalloc
long CurrentBytesFromValloc
long CurrentBytesMmap
long CurrentBytesSbrk
long CurrentBytesSystem
long CurrentRegionsAlloc
long InternalUsedBytesMalloc
long MaxBytesFromMalloc
long MaxBytesFromValloc
long MaxBytesMmap
long MaxBytesSbrk
long MaxBytesSystem
long MaxPages
long MaxRegionsAlloc
long UsedBytes
long UsedBytesFromValloc
long UsedBytesMalloc
long UsedPages

Macro Definition Documentation

◆ memcpyW

#define memcpyW (   A,
  B,
 
)    memcpy(A,B,(C)*sizeof(long))

Definition at line 289 of file xalloc.h.

◆ OM_NDEBUG

#define OM_NDEBUG   1

Definition at line 10 of file xalloc.h.

◆ omAlloc0Aligned

#define omAlloc0Aligned (   S)    omAlloc0(S)

Definition at line 263 of file xalloc.h.

◆ omAlloc0Bin

#define omAlloc0Bin (   B)    omAlloc0(B)

Definition at line 267 of file xalloc.h.

◆ omAllocAligned

#define omAllocAligned (   S)    omAlloc(S)

Definition at line 264 of file xalloc.h.

◆ omAllocBin

#define omAllocBin (   B)    omAlloc(B)

Definition at line 265 of file xalloc.h.

◆ omAllocBin0

#define omAllocBin0 (   B)    omAlloc0(B)

Definition at line 266 of file xalloc.h.

◆ omCheckAddr

#define omCheckAddr (   addr)    do {} while (0)

Definition at line 304 of file xalloc.h.

◆ omcheckAddr

#define omcheckAddr (   addr)    do {} while (0)

Definition at line 306 of file xalloc.h.

◆ omCheckAddrBin

#define omCheckAddrBin (   addr,
  bin 
)    do {} while (0)

Definition at line 301 of file xalloc.h.

◆ omCheckAddrSize

#define omCheckAddrSize (   addr,
  size 
)    do {} while (0)

Definition at line 303 of file xalloc.h.

◆ omcheckAddrSize

#define omcheckAddrSize (   addr,
  size 
)    do {} while (0)

Definition at line 305 of file xalloc.h.

◆ omCheckBin

#define omCheckBin (   bin)    do {} while (0)

Definition at line 307 of file xalloc.h.

◆ omCheckBinAddr

#define omCheckBinAddr (   addr)    do {} while (0)

Definition at line 300 of file xalloc.h.

◆ omCheckBinAddrSize

#define omCheckBinAddrSize (   addr,
  size 
)    do {} while (0)

Definition at line 302 of file xalloc.h.

◆ omCheckIf

#define omCheckIf (   cond,
  test 
)    do {} while (0)

Definition at line 299 of file xalloc.h.

◆ omCheckMemory

#define omCheckMemory ( )    do {} while (0)

Definition at line 308 of file xalloc.h.

◆ omdebugAddrSize

#define omdebugAddrSize (   A,
  B 
)    do {} while (0)

Definition at line 313 of file xalloc.h.

◆ omfree

#define omfree (   P)    omFree(P)

Definition at line 275 of file xalloc.h.

◆ omFreeBin

#define omFreeBin (   P,
  B 
)    omFree(P)

Definition at line 276 of file xalloc.h.

◆ omFreeBinAddr

#define omFreeBinAddr (   P)    omFree(P)

Definition at line 279 of file xalloc.h.

◆ omFreeFunc

#define omFreeFunc   omFree

Definition at line 278 of file xalloc.h.

◆ omfreeSize

#define omfreeSize (   P,
 
)    omFreeSize(P,S)

Definition at line 277 of file xalloc.h.

◆ omFreeSizeFunc

#define omFreeSizeFunc   omFreeSize

Definition at line 330 of file xalloc.h.

◆ omGetSpecBin

#define omGetSpecBin (   A)    (A)

Definition at line 287 of file xalloc.h.

◆ omGetStickyBinOfBin

#define omGetStickyBinOfBin (   B)    omGetSpecBin(B)

Definition at line 290 of file xalloc.h.

◆ omInitGetBackTrace

#define omInitGetBackTrace ( )

Definition at line 269 of file xalloc.h.

◆ omInitInfo

#define omInitInfo ( )

Definition at line 268 of file xalloc.h.

◆ omInitRet_2_Info

#define omInitRet_2_Info (   argv0)    do {} while (0)

Definition at line 318 of file xalloc.h.

◆ omIsBinPageAddr

#define omIsBinPageAddr (   A)    (1)

Definition at line 315 of file xalloc.h.

◆ omMallocFunc

#define omMallocFunc   omAlloc

Definition at line 328 of file xalloc.h.

◆ omMarkAsStaticAddr

#define omMarkAsStaticAddr (   A)

Definition at line 284 of file xalloc.h.

◆ omMarkMemoryAsStatic

#define omMarkMemoryAsStatic ( )

Definition at line 274 of file xalloc.h.

◆ omMemCpyW

#define omMemCpyW (   A,
  B,
 
)    memcpy(A,B,(S)<<2)

Definition at line 285 of file xalloc.h.

◆ omMemcpyW

#define omMemcpyW (   A,
  B,
 
)    memcpy(A,B,(S)<<2)

Definition at line 286 of file xalloc.h.

◆ omMemDupAligned

#define omMemDupAligned   omMemDup

Definition at line 298 of file xalloc.h.

◆ omMergeStickyBinIntoBin

#define omMergeStickyBinIntoBin (   A,
  B 
)    do {} while (0)

Definition at line 319 of file xalloc.h.

◆ omPrintAddrInfo

#define omPrintAddrInfo (   A,
  B,
 
)    do {} while (0)

Definition at line 314 of file xalloc.h.

◆ omPrintBinStats

#define omPrintBinStats (   F)

Definition at line 273 of file xalloc.h.

◆ omPrintCurrentBackTrace

#define omPrintCurrentBackTrace (   F)    do {} while (0)

Definition at line 311 of file xalloc.h.

◆ omPrintCurrentBackTraceMax

#define omPrintCurrentBackTraceMax (   A,
  B 
)    do {} while (0)

Definition at line 309 of file xalloc.h.

◆ omPrintInfo

#define omPrintInfo (   F)

Definition at line 272 of file xalloc.h.

◆ omPrintStats

#define omPrintStats (   F)

Definition at line 271 of file xalloc.h.

◆ omPrintUsedAddrs

#define omPrintUsedAddrs (   F,
  max 
)    do {} while (0)

Definition at line 312 of file xalloc.h.

◆ omPrintUsedTrackAddrs

#define omPrintUsedTrackAddrs (   F,
  max 
)    do {} while (0)

Definition at line 310 of file xalloc.h.

◆ omrealloc

#define omrealloc (   A,
  NS 
)    omRealloc(A,NS)

Definition at line 280 of file xalloc.h.

◆ omRealloc0AlignedSize

#define omRealloc0AlignedSize   omRealloc0Size

Definition at line 297 of file xalloc.h.

◆ omRealloc0Size

#define omRealloc0Size (   A,
  OS,
  NS 
)    omRealloc0(A,NS)

Definition at line 282 of file xalloc.h.

◆ omrealloc0Size

#define omrealloc0Size (   A,
  OS,
  NS 
)    omRealloc(A,NS)

Definition at line 283 of file xalloc.h.

◆ omReallocAligned

#define omReallocAligned (   A,
  B 
)    omRealloc(A,B)

Definition at line 115 of file xalloc.h.

◆ omReallocAlignedSize

#define omReallocAlignedSize   omReallocSize

Definition at line 296 of file xalloc.h.

◆ omreallocSize

#define omreallocSize (   A,
  OS,
  NS 
)    omRealloc(A,NS)

Definition at line 281 of file xalloc.h.

◆ omReallocSizeFunc

#define omReallocSizeFunc   omReallocSize

Definition at line 329 of file xalloc.h.

◆ omSizeWOfAddr

#define omSizeWOfAddr (   P)    (omSizeOfAddr(P)/sizeof(long))

Definition at line 258 of file xalloc.h.

◆ omSizeWOfBin

#define omSizeWOfBin (   bin_ptr)    (((bin_ptr)+sizeof(long)-1)/sizeof(long))

Definition at line 221 of file xalloc.h.

◆ omTestBinAddrSize

#define omTestBinAddrSize (   A,
  B,
 
)    (omError_NoError)

Definition at line 316 of file xalloc.h.

◆ omTestList

#define omTestList (   ptr,
  level 
)    (omError_NoError)

Definition at line 317 of file xalloc.h.

◆ omTypeAlloc

#define omTypeAlloc (   T,
  P,
 
)    P=(T)omAlloc(S)

Definition at line 261 of file xalloc.h.

◆ omTypeAlloc0Bin

#define omTypeAlloc0Bin (   T,
  P,
  B 
)    P=(T)omAlloc0(B)

Definition at line 262 of file xalloc.h.

◆ omTypeAllocBin

#define omTypeAllocBin (   T,
  P,
  B 
)    P=(T)omAlloc(B)

Definition at line 260 of file xalloc.h.

◆ omTypeRealloc0AlignedSize

#define omTypeRealloc0AlignedSize   omTypeRealloc0Size

Definition at line 295 of file xalloc.h.

◆ omTypeReallocAlignedSize

#define omTypeReallocAlignedSize   omTypeReallocSize

Definition at line 294 of file xalloc.h.

◆ omUnGetSpecBin

#define omUnGetSpecBin (   A)    do {} while (0)

Definition at line 288 of file xalloc.h.

◆ omUpdateInfo

#define omUpdateInfo ( )

Definition at line 270 of file xalloc.h.

◆ REGISTER

#define REGISTER   register

Definition at line 26 of file xalloc.h.

◆ X_OMALLOC

#define X_OMALLOC

Definition at line 327 of file xalloc.h.

Typedef Documentation

◆ omBin

typedef size_t omBin

Definition at line 32 of file xalloc.h.

Enumeration Type Documentation

◆ omError_e

enum omError_e
Enumerator
omError_NoError 
omError_Unknown 
omError_InternalBug 
omError_MemoryCorrupted 
omError_NullAddr 
omError_InvalidRangeAddr 
omError_FalseAddr 
omError_FalseAddrOrMemoryCorrupted 
omError_WrongSize 
omError_FreedAddr 
omError_FreedAddrOrMemoryCorrupted 
omError_WrongBin 
omError_UnknownBin 
omError_NotBinAddr 
omError_UnalignedAddr 
omError_NullSizeAlloc 
omError_ListCycleError 
omError_SortedListError 
omError_KeptAddrListCorrupted 
omError_FreePattern 
omError_BackPattern 
omError_FrontPattern 
omError_NotString 
omError_StickyBin 
omError_MaxError 
omError_NoError 
omError_Unknown 
omError_InternalBug 
omError_MemoryCorrupted 
omError_NullAddr 
omError_InvalidRangeAddr 
omError_FalseAddr 
omError_FalseAddrOrMemoryCorrupted 
omError_WrongSize 
omError_FreedAddr 
omError_FreedAddrOrMemoryCorrupted 
omError_WrongBin 
omError_UnknownBin 
omError_NotBinAddr 
omError_UnalignedAddr 
omError_NullSizeAlloc 
omError_ListCycleError 
omError_SortedListError 
omError_KeptAddrListCorrupted 
omError_FreePattern 
omError_BackPattern 
omError_FrontPattern 
omError_NotString 
omError_StickyBin 
omError_MaxError 

Definition at line 228 of file xalloc.h.

229 {
230  omError_NoError = 0,
255 };

Function Documentation

◆ omalloc()

static void* omalloc ( size_t  s)
inlinestatic

Definition at line 83 of file xalloc.h.

84 { if (s!=0)
85 #if defined(HAVE_MALLOC_USABLE_SIZE) || defined(HAVE_MALLOC_SIZE)
86  { return malloc(s); }
87 #else
88  {long *d=(long*)malloc(s+sizeof(long)); *d=s;d++;return d; }
89 #endif
90  else return NULL;
91 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
void * malloc(size_t size)
Definition: omalloc.c:92
#define NULL
Definition: omList.c:12

◆ omAlloc()

static void* omAlloc ( size_t  s)
inlinestatic

Definition at line 92 of file xalloc.h.

94 { return malloc(s); }
95 #else
96 { long *d=(long*)malloc(s+sizeof(long)); *d=s;d++;return d; }
const CanonicalForm int s
Definition: facAbsFact.cc:55
void * malloc(size_t size)
Definition: omalloc.c:92

◆ omAlloc0()

static void* omAlloc0 ( size_t  s)
inlinestatic

Definition at line 98 of file xalloc.h.

99 { void *d=omAlloc(s);memset(d,0,s); return d; }
const CanonicalForm int s
Definition: facAbsFact.cc:55
static void * omAlloc(size_t s)
Definition: xalloc.h:92

◆ omalloc0()

static void* omalloc0 ( size_t  s)
inlinestatic

Definition at line 100 of file xalloc.h.

101 { if (s!=0) { void *d=omAlloc(s);memset(d,0,s); return d;} else return NULL; }
const CanonicalForm int s
Definition: facAbsFact.cc:55
static void * omAlloc(size_t s)
Definition: xalloc.h:92
#define NULL
Definition: omList.c:12

◆ omFree()

static void omFree ( void *  d)
inlinestatic

Definition at line 137 of file xalloc.h.

139 { free(d); }
140 #else
141 { if (d!=NULL) { long *dd=(long*)d; dd--; free(dd);}}
#define free
Definition: omAllocFunc.c:14
#define NULL
Definition: omList.c:12

◆ omFreeSize()

static void omFreeSize ( void *  d,
__attribute__((unused)) size_t  s 
)
inlinestatic

Definition at line 187 of file xalloc.h.

189 { free(d); }
190 #else
191 { if (d!=NULL) { long *dd=(long*)d; dd--; free(dd);}}
#define free
Definition: omAllocFunc.c:14
#define NULL
Definition: omList.c:12

◆ omMemDup()

static void* omMemDup ( void *  s)
inlinestatic

Definition at line 198 of file xalloc.h.

200 { size_t l=malloc_usable_size(s);
201  void *n=malloc(l);
202  memcpy(n,s,l);
203  return n;
204 }
205 #elif defined(HAVE_MALLOC_SIZE)
206 { size_t l=malloc_size(s);
207  void *n=malloc(l);
208  memcpy(n,s,l);
209  return n;
210 }
211 #else
212 { long *n;long *d=(long*)s; d--;
213  n=(long*)malloc(*d+sizeof(long));
214  memcpy(n,d,(*d)+sizeof(long));
215  n++;
216  return n;
217 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
void * malloc(size_t size)
Definition: omalloc.c:92
int l
Definition: cfEzgcd.cc:93

◆ omRealloc()

static void* omRealloc ( void *  d,
size_t  ns 
)
inlinestatic

Definition at line 103 of file xalloc.h.

104 { if (d==NULL) return omAlloc(ns);
105  else
106 #if defined(HAVE_MALLOC_USABLE_SIZE) || defined(HAVE_MALLOC_SIZE)
107  return realloc(d,ns);
108 #else
109  {
110  long *dd=(long*)d; dd--; dd=(long*)realloc(dd,ns+sizeof(long));
111  *dd=ns+sizeof(long);dd++; return dd;
112  }
113 #endif
114 }
#define realloc
Definition: omAllocFunc.c:16
static void * omAlloc(size_t s)
Definition: xalloc.h:92
#define NULL
Definition: omList.c:12

◆ omRealloc0()

static void* omRealloc0 ( void *  d,
size_t  ns 
)
inlinestatic

Definition at line 144 of file xalloc.h.

145 {
146 #ifdef HAVE_MALLOC_USABLE_SIZE
147  size_t os=0;
148  if (d!=NULL) os=malloc_usable_size(d);
149  if (os>=ns)
150  {
151  void *n=realloc(d,ns);
152  return n;
153  }
154  else
155  {
156  char *n=(char*)realloc(d,ns);
157  memset(n+(ns-os),0,ns-os);
158  return (void*)n;
159  }
160 #elif defined(HAVE_MALLOC_SIZE)
161  size_t os=0;
162  if (d!=NULL) os=malloc_size(d);
163  if (os>=ns)
164  {
165  void *n=realloc(d,ns);
166  return n;
167  }
168  else
169  {
170  char *n=(char*)realloc(d,ns);
171  memset(n+(ns-os),0,ns-os);
172  return (void*)n;
173  }
174 #else
175  void *n=omAlloc0(ns);
176  if (d!=NULL)
177  {
178  size_t c;
179  size_t os=omSizeOfAddr(d);
180  if (ns>os) c=os; else c=ns;
181  memcpy(n,d,c);
182  omFree(d);
183  }
184  return n;
185 #endif
186 }
static void omFree(void *d)
Definition: xalloc.h:137
static long omSizeOfAddr(void *d)
Definition: xalloc.h:128
#define realloc
Definition: omAllocFunc.c:16
static void * omAlloc0(size_t s)
Definition: xalloc.h:98
#define NULL
Definition: omList.c:12

◆ omReallocSize()

static void* omReallocSize ( void *  d,
__attribute__((unused)) size_t  os,
size_t  ns 
)
inlinestatic

Definition at line 116 of file xalloc.h.

117 { if (d==NULL) return omAlloc(ns);
118  else
119 #if defined(HAVE_MALLOC_USABLE_SIZE) || defined(HAVE_MALLOC_SIZE)
120  return realloc(d,ns);
121 #else
122  {
123  long *dd=(long*)d; dd--; dd=(long*)realloc(dd,ns+sizeof(long));
124  *dd=ns+sizeof(long);dd++; return dd;
125  }
126 #endif
127 }
#define realloc
Definition: omAllocFunc.c:16
static void * omAlloc(size_t s)
Definition: xalloc.h:92
#define NULL
Definition: omList.c:12

◆ omSizeOfAddr()

static long omSizeOfAddr ( void *  d)
inlinestatic

Definition at line 128 of file xalloc.h.

130 { return malloc_usable_size(d); }
131 #elif defined(HAVE_AMLLOC_SIZE)
132 { return malloc_size(d); }
133 #else
134 { long *dd=(long*)d; dd--; return *dd;}

◆ omStrDup()

static char* omStrDup ( const char *  s)
inlinestatic

Definition at line 194 of file xalloc.h.

195 { size_t l=strlen(s);char *ns=(char *)omAlloc(l+1);
196  return strcpy(ns,s);
197 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
static void * omAlloc(size_t s)
Definition: xalloc.h:92
int l
Definition: cfEzgcd.cc:93

Variable Documentation

◆ om_Info

struct omInfo_s om_Info

Definition at line 16 of file omStats.c.

◆ om_Opts

struct omOpts_s om_Opts

Definition at line 13 of file omOpts.c.

◆ om_sing_opt_show_mem

int om_sing_opt_show_mem