Loading...
Searching...
No Matches
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
struct | omBin_next_t
struct | omBin_t

## Macros

#define | OM_NDEBUG 1
#define | XALLOC_BIN 1
#define | REGISTER register
#define | omalloc(s)
#define | omAlloc(s)
#define | omfree(d)
#define | omFree(d)
#define | omFreeSize(d, s)
#define | omStrDup(s)
#define | omSizeWOfBin(bin_ptr)
#define | omTypeAllocBin(T, P, B)
#define | omTypeAlloc0Bin(T, P, B)
#define | omSizeWOfAddr(P)
#define | omTypeAlloc(T, P, S)
#define | omAlloc0Aligned(S)
#define | omAllocAligned(S)
#define | omInitInfo()
#define | omInitGetBackTrace()
#define | omUpdateInfo()
#define | omPrintStats(F)
#define | omPrintInfo(F)
#define | omPrintBinStats(F)
#define | omMarkMemoryAsStatic()
#define | omfreeSize(P, S)
#define | omFreeFunc free
#define | omFreeBinAddr(P)
#define | omrealloc(A, NS)
#define | omreallocSize(A, OS, NS)
#define | omrealloc0Size(A, OS, NS)
#define | omRealloc(A, B)
#define | omReallocAligned(A, B)
#define | omReallocSize(A, B, C)
#define | omReallocAlignedSize(A, B)
#define | omMarkAsStaticAddr(A)
#define | omMemcpyW(A, B, C)
#define | omGetStickyBinOfBin(B)
#define | omTypeReallocAlignedSize omTypeReallocSize
#define | omTypeRealloc0AlignedSize omTypeRealloc0Size
#define | omRealloc0AlignedSize omRealloc0Size
#define | omMemDupAligned omMemDup
#define | omCheckIf(cond, test)
#define | omCheckBinAddr(addr)
#define | omCheckAddrBin(addr, bin)
#define | omCheckBinAddrSize(addr, size)
#define | omCheckAddrSize(addr, size)
#define | omCheckAddr(addr)
#define | omcheckAddrSize(addr, size)
#define | omcheckAddr(addr)
#define | omCheckBin(bin)
#define | omCheckMemory()
#define | omPrintCurrentBackTraceMax(A, B)
#define | omPrintUsedTrackAddrs(F, max)
#define | omPrintCurrentBackTrace(F)
#define | omPrintUsedAddrs(F, max)
#define | omdebugAddrSize(A, B)
#define | omPrintAddrInfo(A, B, C)
#define | omIsBinPageAddr(A)
#define | omTestBinAddrSize(A, B, C)
#define | omTestList(ptr, level)
#define | omInitRet_2_Info(argv0)
#define | omMergeStickyBinIntoBin(A, B)
#define | X_OMALLOC
#define | omMallocFunc malloc
#define | omFreeSizeFunc omFreeSize
#define | omReallocSizeFunc realloc

## Typedefs

typedef omBin_next_t * | omBin_next
typedef omBin_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
}

## Functions

static void * | omAlloc0 (size_t s)
static void * | omalloc0 (size_t s)
static void * | omRealloc0Size (void *d, __attribute__((unused)) size_t os, size_t ns)
static void * | omAllocBin (omBin b)
static void * | omAlloc0Bin (omBin b)
static void | omFreeBin (void *p, omBin b)
static omBin | omGetSpecBin (size_t s)
static void | omUnGetSpecBin (omBin *A)

## 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 |

## omOpts_s

struct omOpts_s

Definition at line 11 of file omOpts.h.

Data Fields
void(*)(void) | ErrorHook |
int | HowToReportErrors |
int | Keep |
int | MarkAsStatic |
int | MaxCheck |
int | MaxTrack |
void(*)(void) | MemoryLowFunc |
int | MinCheck |
int | MinTrack |
void(*)(void) | OutOfMemoryFunc |
unsigned int | PagesPerRegion |

## omBin_next_s

struct omBin_next_s

Definition at line 112 of file xalloc.h.

Data Fields
omBin_next | next |

## omBin_s

struct omBin_s

Definition at line 36 of file omAllocPrivate.h.

Data Fields
omBin_next | curr |
omBinPage | current_page |
omBinPage | last_page |
long | max_blocks |
omBin | next |
size_t | size |
size_t | sizeW |
unsigned long | sticky |

## Macro Definition Documentation

## OM_NDEBUG

#define OM_NDEBUG 1

Definition at line 10 of file xalloc.h.

## omAlloc

#define omAlloc | ( |  | s | ) |

Value:
malloc(s)
s
const CanonicalForm int s
Definition facAbsFact.cc:51
malloc
#define malloc
Definition omAllocFunc.c:12

Definition at line 85 of file xalloc.h.

## omalloc

#define omalloc | ( |  | s | ) |

Value:
malloc(s)

Definition at line 84 of file xalloc.h.

## omAlloc0Aligned

#define omAlloc0Aligned | ( |  | S | ) |

Value:
omAlloc0(S)
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211

Definition at line 226 of file xalloc.h.

## omAllocAligned

#define omAllocAligned | ( |  | S | ) |

Value:
omAlloc(S)
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210

Definition at line 227 of file xalloc.h.

## omCheckAddr

#define omCheckAddr | ( |  | addr | ) |

Value:
do {} while (0)

Definition at line 260 of file xalloc.h.

## omcheckAddr

#define omcheckAddr | ( |  | addr | ) |

Value:
do {} while (0)

Definition at line 262 of file xalloc.h.

## omCheckAddrBin

#define omCheckAddrBin | ( |  | addr,
|  |  | bin )

Value:
do {} while (0)

Definition at line 257 of file xalloc.h.

## omCheckAddrSize

#define omCheckAddrSize | ( |  | addr,
|  |  | size )

Value:
do {} while (0)

Definition at line 259 of file xalloc.h.

## omcheckAddrSize

#define omcheckAddrSize | ( |  | addr,
|  |  | size )

Value:
do {} while (0)

Definition at line 261 of file xalloc.h.

## omCheckBin

#define omCheckBin | ( |  | bin | ) |

Value:
do {} while (0)

Definition at line 263 of file xalloc.h.

## omCheckBinAddr

#define omCheckBinAddr | ( |  | addr | ) |

Value:
do {} while (0)

Definition at line 256 of file xalloc.h.

## omCheckBinAddrSize

#define omCheckBinAddrSize | ( |  | addr,
|  |  | size )

Value:
do {} while (0)

Definition at line 258 of file xalloc.h.

## omCheckIf

#define omCheckIf | ( |  | cond,
|  |  | test )

Value:
do {} while (0)

Definition at line 255 of file xalloc.h.

## omCheckMemory

#define omCheckMemory | ( |  | ) |

Value:
do {} while (0)

Definition at line 264 of file xalloc.h.

## omdebugAddrSize

#define omdebugAddrSize | ( |  | A,
|  |  | B )

Value:
do {} while (0)

Definition at line 269 of file xalloc.h.

## omFree

#define omFree | ( |  | d | ) |

Value:
free(d)
free
#define free
Definition omAllocFunc.c:14

Definition at line 104 of file xalloc.h.

## omfree

#define omfree | ( |  | d | ) |

Value:
free(d)

Definition at line 103 of file xalloc.h.

## omFreeBinAddr

#define omFreeBinAddr | ( |  | P | ) |

Value:
free(P)

Definition at line 237 of file xalloc.h.

## omFreeFunc

#define omFreeFunc free

Definition at line 236 of file xalloc.h.

## omFreeSize

#define omFreeSize | ( |  | d,
|  |  | s )

Value:
free(d)

Definition at line 105 of file xalloc.h.

## omfreeSize

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

Value:
free(P)

Definition at line 235 of file xalloc.h.

## omFreeSizeFunc

#define omFreeSizeFunc omFreeSize

Definition at line 285 of file xalloc.h.

## omGetStickyBinOfBin

#define omGetStickyBinOfBin | ( |  | B | ) |

Value:
(B)
B
b *CanonicalForm B
Definition facBivar.cc:52

Definition at line 247 of file xalloc.h.

## omInitGetBackTrace

#define omInitGetBackTrace | ( |  | ) |

Definition at line 229 of file xalloc.h.

## omInitInfo

#define omInitInfo | ( |  | void | ) |

Definition at line 228 of file xalloc.h.

## omInitRet_2_Info

#define omInitRet_2_Info | ( |  | argv0 | ) |

Value:
do {} while (0)

Definition at line 274 of file xalloc.h.

## omIsBinPageAddr

#define omIsBinPageAddr | ( |  | A | ) |

Value:
(1)

Definition at line 271 of file xalloc.h.

## omMallocFunc

#define omMallocFunc malloc

Definition at line 284 of file xalloc.h.

## omMarkAsStaticAddr

#define omMarkAsStaticAddr | ( |  | A | ) |

Definition at line 245 of file xalloc.h.

## omMarkMemoryAsStatic

#define omMarkMemoryAsStatic | ( |  | ) |

Definition at line 234 of file xalloc.h.

## omMemcpyW

#define omMemcpyW | ( |  | A,
|  |  | B,
|  |  | C )

Value:
memcpy(A,B,(C)*SIZEOF_LONG)
A
#define A
Definition sirandom.c:24

Definition at line 246 of file xalloc.h.

## omMemDupAligned

#define omMemDupAligned omMemDup

Definition at line 254 of file xalloc.h.

## omMergeStickyBinIntoBin

#define omMergeStickyBinIntoBin | ( |  | A,
|  |  | B )

Value:
do {} while (0)

Definition at line 275 of file xalloc.h.

## omPrintAddrInfo

#define omPrintAddrInfo | ( |  | A,
|  |  | B,
|  |  | C )

Value:
do {} while (0)

Definition at line 270 of file xalloc.h.

## omPrintBinStats

#define omPrintBinStats | ( |  | F | ) |

Definition at line 233 of file xalloc.h.

## omPrintCurrentBackTrace

#define omPrintCurrentBackTrace | ( |  | F | ) |

Value:
do {} while (0)

Definition at line 267 of file xalloc.h.

## omPrintCurrentBackTraceMax

#define omPrintCurrentBackTraceMax | ( |  | A,
|  |  | B )

Value:
do {} while (0)

Definition at line 265 of file xalloc.h.

## omPrintInfo

#define omPrintInfo | ( |  | F | ) |

Definition at line 232 of file xalloc.h.

## omPrintStats

#define omPrintStats | ( |  | F | ) |

Definition at line 231 of file xalloc.h.

## omPrintUsedAddrs

#define omPrintUsedAddrs | ( |  | F,
|  |  | max )

Value:
do {} while (0)

Definition at line 268 of file xalloc.h.

## omPrintUsedTrackAddrs

#define omPrintUsedTrackAddrs | ( |  | F,
|  |  | max )

Value:
do {} while (0)

Definition at line 266 of file xalloc.h.

## omRealloc

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

Value:
realloc(A,B)
realloc
#define realloc
Definition omAllocFunc.c:16

Definition at line 241 of file xalloc.h.

## omrealloc

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

Value:
realloc(A,NS)

Definition at line 238 of file xalloc.h.

## omRealloc0AlignedSize

#define omRealloc0AlignedSize omRealloc0Size

Definition at line 253 of file xalloc.h.

## omrealloc0Size

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

Value:
omRealloc0Size(A,OS,NS)
omRealloc0Size
#define omRealloc0Size(addr, o_size, size)
Definition omAllocDecl.h:221

Definition at line 240 of file xalloc.h.

## omReallocAligned

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

Value:
realloc(A,B)

Definition at line 242 of file xalloc.h.

## omReallocAlignedSize

#define omReallocAlignedSize | ( |  | A,
|  |  | B )

Value:
realloc(A,B)

Definition at line 244 of file xalloc.h.

## omReallocSize

#define omReallocSize | ( |  | A,
|  |  | B,
|  |  | C )

Value:
realloc(A,C)

Definition at line 243 of file xalloc.h.

## omreallocSize

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

Value:
realloc(A,NS)

Definition at line 239 of file xalloc.h.

## omReallocSizeFunc

#define omReallocSizeFunc realloc

Definition at line 286 of file xalloc.h.

## omSizeWOfAddr

#define omSizeWOfAddr | ( |  | P | ) |

Value:
(omSizeOfAddr(P)/SIZEOF_LONG)
omSizeOfAddr
size_t omSizeOfAddr(const void *addr)
Definition omAllocSystem.c:110

Definition at line 223 of file xalloc.h.

## omSizeWOfBin

#define omSizeWOfBin | ( |  | bin_ptr | ) |

Value:
(((bin_ptr->size)+SIZEOF_LONG-1)/SIZEOF_LONG)

Definition at line 124 of file xalloc.h.

## omStrDup

#define omStrDup | ( |  | s | ) |

Value:
strdup(s)
strdup
#define strdup
Definition omAllocFunc.c:18

Definition at line 107 of file xalloc.h.

## omTestBinAddrSize

#define omTestBinAddrSize | ( |  | A,
|  |  | B,
|  |  | C )

Value:
(omError_NoError)
omError_NoError
@ omError_NoError
Definition omError.h:18

Definition at line 272 of file xalloc.h.

## omTestList

#define omTestList | ( |  | ptr,
|  |  | level )

Value:
(omError_NoError)

Definition at line 273 of file xalloc.h.

## omTypeAlloc

#define omTypeAlloc | ( |  | T,
|  |  | P,
|  |  | S )

Value:
P=(T)omAlloc(S)
T
STATIC_VAR jList * T
Definition janet.cc:30

Definition at line 225 of file xalloc.h.

## omTypeAlloc0Bin

#define omTypeAlloc0Bin | ( |  | T,
|  |  | P,
|  |  | B )

Value:
P=(T)omAlloc0Bin(B)
omAlloc0Bin
#define omAlloc0Bin(bin)
Definition omAllocDecl.h:206

Definition at line 153 of file xalloc.h.

## omTypeAllocBin

#define omTypeAllocBin | ( |  | T,
|  |  | P,
|  |  | B )

Value:
P=(T)omAllocBin(B)
omAllocBin
#define omAllocBin(bin)
Definition omAllocDecl.h:205

Definition at line 152 of file xalloc.h.

## omTypeRealloc0AlignedSize

#define omTypeRealloc0AlignedSize omTypeRealloc0Size

Definition at line 252 of file xalloc.h.

## omTypeReallocAlignedSize

#define omTypeReallocAlignedSize omTypeReallocSize

Definition at line 251 of file xalloc.h.

## omUpdateInfo

#define omUpdateInfo | ( |  | void | ) |

Definition at line 230 of file xalloc.h.

## REGISTER

#define REGISTER register

Definition at line 27 of file xalloc.h.

## X_OMALLOC

#define X_OMALLOC

Definition at line 283 of file xalloc.h.

## XALLOC_BIN

#define XALLOC_BIN 1

Definition at line 12 of file xalloc.h.

## Typedef Documentation

## omBin

typedef omBin_t* omBin

Definition at line 123 of file xalloc.h.

## omBin_next

typedef omBin_next_t* omBin_next

Definition at line 111 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 |

Definition at line 193 of file xalloc.h.

{
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_WrongSize
@ omError_WrongSize
Definition omError.h:26
omError_ListCycleError
@ omError_ListCycleError
Definition omError.h:34
omError_BackPattern
@ omError_BackPattern
Definition omError.h:38
omError_NullAddr
@ omError_NullAddr
Definition omError.h:22
omError_NullSizeAlloc
@ omError_NullSizeAlloc
Definition omError.h:33
omError_MaxError
@ omError_MaxError
Definition omError.h:42
omError_FrontPattern
@ omError_FrontPattern
Definition omError.h:39
omError_UnalignedAddr
@ omError_UnalignedAddr
Definition omError.h:32
omError_MemoryCorrupted
@ omError_MemoryCorrupted
Definition omError.h:21
omError_FreedAddr
@ omError_FreedAddr
Definition omError.h:27
omError_UnknownBin
@ omError_UnknownBin
Definition omError.h:30
omError_FreedAddrOrMemoryCorrupted
@ omError_FreedAddrOrMemoryCorrupted
Definition omError.h:28
omError_NotString
@ omError_NotString
Definition omError.h:40
omError_SortedListError
@ omError_SortedListError
Definition omError.h:35
omError_KeptAddrListCorrupted
@ omError_KeptAddrListCorrupted
Definition omError.h:36
omError_InternalBug
@ omError_InternalBug
Definition omError.h:20
omError_NotBinAddr
@ omError_NotBinAddr
Definition omError.h:31
omError_InvalidRangeAddr
@ omError_InvalidRangeAddr
Definition omError.h:23
omError_FalseAddr
@ omError_FalseAddr
Definition omError.h:24
omError_WrongBin
@ omError_WrongBin
Definition omError.h:29
omError_Unknown
@ omError_Unknown
Definition omError.h:19
omError_StickyBin
@ omError_StickyBin
Definition omError.h:41
omError_FreePattern
@ omError_FreePattern
Definition omError.h:37
omError_FalseAddrOrMemoryCorrupted
@ omError_FalseAddrOrMemoryCorrupted
Definition omError.h:25

## Function Documentation

## omAlloc0()

void * omAlloc0 | ( | size_t | s | ) |

inline static

Definition at line 87 of file xalloc.h.

{ void *d=malloc(s);memset(d,0,s); return d; }

## omalloc0()

void * omalloc0 | ( | size_t | s | ) |

inline static

Definition at line 89 of file xalloc.h.

{ if (s!=0) { void *d=malloc(s);memset(d,0,s); return d;} else return NULL; }
NULL
#define NULL
Definition omList.c:12

## omAlloc0Bin()

void * omAlloc0Bin | ( | omBin | b | ) |

inline static

Definition at line 135 of file xalloc.h.

{
if (b->curr!=NULL)
{
omBin_next p=b->curr;
b->curr=p->next;
memset(p,0,b->size);
return p;
}
else return omAlloc0(b->size);
}
p
int p
Definition cfModGcd.cc:4086
b
CanonicalForm b
Definition cfModGcd.cc:4111
omBin_next
omBin_next_t * omBin_next
Definition xalloc.h:111

## omAllocBin()

void * omAllocBin | ( | omBin | b | ) |

inline static

Definition at line 125 of file xalloc.h.

{
if (b->curr!=NULL)
{
omBin_next p=b->curr;
b->curr=p->next;
return p;
}
else return omAlloc(b->size);
}
omAlloc
#define omAlloc(s)
Definition xalloc.h:85

## omFreeBin()

void omFreeBin | ( | void * | p,
|  | omBin | b )

inline static

Definition at line 146 of file xalloc.h.

{
*((void**) p) = b->curr;
b->curr=(omBin_next)p;
}

## omGetSpecBin()

omBin omGetSpecBin | ( | size_t | s | ) |

inline static

Definition at line 154 of file xalloc.h.

{
omBin b=(omBin)omAlloc(sizeof(*b));
b->size=s;
b->curr=NULL;
return b;
}
omBin
omBin_t * omBin
Definition omStructs.h:12

## omRealloc0Size()

void * omRealloc0Size | ( | void * | d,
|  | __attribute__((unused)) size_t | os,
|  | size_t | ns )

inline static

Definition at line 92 of file xalloc.h.

{ if (d==NULL)
return omAlloc0(ns);
else
{
char *p=(char *)realloc(d,ns);
if (ns>os) memset(p+os,0,ns-os);
return (void*)p;
}
}

## omUnGetSpecBin()

void omUnGetSpecBin | ( | omBin * | A | ) |

inline static

Definition at line 161 of file xalloc.h.

{
omBin_next p=(*A)->curr;
omBin_next pp;
while(p!=NULL)
{
pp=p->next;
omFree(p);
p=pp;
}
(*A)->curr=NULL;
omFree(*A);
}
pp
CanonicalForm FACTORY_PUBLIC pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f ).
Definition cf_gcd.cc:676
omFree
#define omFree(d)
Definition xalloc.h:104

## Variable Documentation

## om_Info

struct omInfo_s om_Info

extern

Definition at line 16 of file omStats.c.

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

## om_Opts

struct omOpts_s om_Opts

Definition at line 25 of file omOpts.c.

{
OM_DEFAULT_MIN_TRACK,
OM_DEFAULT_MIN_CHECK,
OM_DEFAULT_MAX_TRACK,
OM_DEFAULT_MAX_CHECK,
OM_DEFAULT_KEEP,
OM_DEFAULT_HOW_TO_REPORT_ERRORS,
OM_DEFAULT_MARK_AS_STATIC,
OM_DEFAULT_PAGES_PER_REGION,
OM_DEFAULT_OUT_OF_MEMORY_FUNC,
OM_DEFAULT_MEMORY_LOW_FUNC,
OM_DEFAULT_ERROR_HOOK
};

## om_sing_opt_show_mem

int om_sing_opt_show_mem

extern