Loading...
Searching...
No Matches
omBin.h File Reference

Go to the source code of this file.

## Macros

#define | omGetAlignedSpecBin(size)
#define | omGetSpecBin(size)
#define | omUnGetSpecBin(bin_ptr)
#define | omDeleteSpecBin(bin_ptr)
#define | omIsStickyBin(bin)
#define | omIsStaticNormalBin(bin)
#define | omIsNormalBin(bin)
#define | omIsSpecBin(bin)
#define | omIsKnownTopBin(bin, normal_bin)
#define | omIsStaticTrackBin(bin)
#define | omIsTrackBin(bin)
#define | omIsStaticBin(bin)

## Functions

omBin | _omGetSpecBin (size_t size, int align, int track)
void | _omUnGetSpecBin (omBin *bin, int force)
long | omGetUsedBinBytes (void)
omBin | omGetStickyBinOfBin (omBin bin)
void | omMergeStickyBinIntoBin (omBin sticky_bin, omBin into_bin)
unsigned long | omGetNewStickyBinTag (omBin bin)
void | omSetStickyBinTag (omBin bin, unsigned long sticky)
void | omUnSetStickyBinTag (omBin bin, unsigned long sticky)
void | omDeleteStickyBinTag (omBin bin, unsigned long sticky)
unsigned long | omGetNewStickyAllBinTag (void)
void | omSetStickyAllBinTag (unsigned long sticky)
void | omUnSetStickyAllBinTag (unsigned long sticky)
void | omDeleteStickyAllBinTag (unsigned long sticky)
void | omPrintBinStats (FILE *fd)
int | omIsKnownTopBin (omBin bin, int normal_bin)

## Macro Definition Documentation

## omDeleteSpecBin

#define omDeleteSpecBin | ( |  | bin_ptr | ) |

Value:
_omUnGetSpecBin(bin_ptr, 1)
_omUnGetSpecBin
void _omUnGetSpecBin(omBin *bin_p, int force)
Definition omBin.c:142

Definition at line 15 of file omBin.h.

## omGetAlignedSpecBin

#define omGetAlignedSpecBin | ( |  | size | ) |

Value:
_omGetSpecBin(size, 1, 0)
size
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition cf_ops.cc:600
_omGetSpecBin
omBin _omGetSpecBin(size_t size, int align, int track)
Definition omBin.c:26

Definition at line 10 of file omBin.h.

## omGetSpecBin

#define omGetSpecBin | ( |  | size | ) |

Value:
_omGetSpecBin(size, 0, 0)

Definition at line 11 of file omBin.h.

## omIsKnownTopBin

#define omIsKnownTopBin | ( |  | bin,
|  |  | normal_bin )

Value:
1

Definition at line 55 of file omBin.h.

## omIsNormalBin

#define omIsNormalBin | ( |  | bin | ) |

Value:
omIsStaticNormalBin(bin) || omFindInGList(om_SpecBin, next, bin, bin) || omIsStickyBin(bin)
next
ListNode * next
Definition janet.h:31
omIsStickyBin
#define omIsStickyBin(bin)
Definition omBin.h:33
omIsStaticNormalBin
#define omIsStaticNormalBin(bin)
Definition omBin.h:43
omFindInGList
#define omFindInGList(ptr, next, what, value)
Definition omList.h:104
om_SpecBin
omSpecBin om_SpecBin
Definition om_Alloc.c:20

Definition at line 46 of file omBin.h.

## omIsSpecBin

#define omIsSpecBin | ( |  | bin | ) |

Value:
(!omIsStaticNormalBin(bin) && !omIsStickyBin(bin))

Definition at line 47 of file omBin.h.

## omIsStaticBin

#define omIsStaticBin | ( |  | bin | ) |

Value:
omIsStaticNormalBin(bin) || omIsStaticTrackBin(bin)
omIsStaticTrackBin
#define omIsStaticTrackBin(bin)
Definition omBin.h:56

Definition at line 59 of file omBin.h.

## omIsStaticNormalBin

#define omIsStaticNormalBin | ( |  | bin | ) |

Value:
((unsigned long) bin >= ((unsigned long) &om_StaticBin[0]) && \
(unsigned long) bin <= ((unsigned long) &om_StaticBin[OM_MAX_BIN_INDEX]))
om_StaticBin
omBin_t om_StaticBin[]
OM_MAX_BIN_INDEX
#define OM_MAX_BIN_INDEX
Definition omTables.h:4

Definition at line 43 of file omBin.h.

#define omIsStaticNormalBin(bin) \
((unsigned long) bin >= ((unsigned long) &om_StaticBin[0]) && \
(unsigned long) bin <= ((unsigned long) &om_StaticBin[OM_MAX_BIN_INDEX]))

## omIsStaticTrackBin

#define omIsStaticTrackBin | ( |  | bin | ) |

Value:
0

Definition at line 56 of file omBin.h.

## omIsStickyBin

#define omIsStickyBin | ( |  | bin | ) |

Value:
(bin->sticky >= SIZEOF_VOIDP)

Definition at line 33 of file omBin.h.

## omIsTrackBin

#define omIsTrackBin | ( |  | bin | ) |

Value:
0

Definition at line 57 of file omBin.h.

## omUnGetSpecBin

#define omUnGetSpecBin | ( |  | bin_ptr | ) |

Value:
_omUnGetSpecBin(bin_ptr, 0)

Definition at line 14 of file omBin.h.

## Function Documentation

## _omGetSpecBin()

omBin _omGetSpecBin | ( | size_t | size,
|  | int | align,
|  | int | track )

Definition at line 26 of file omBin.c.

{
omBin om_new_specBin;
long max_blocks;
long sizeW;
size = OM_ALIGN_SIZE(size);
#ifdef OM_ALIGNMENT_NEEDS_WORK
if (align || size >= OM_SIZEOF_UNIQUE_MAX_BLOCK_THRESHOLD)
{
align = 1;
size = OM_STRICT_ALIGN_SIZE(size);
}
#else
align = 0;
#endif
if (size > SIZEOF_OM_BIN_PAGE)
{
/* need page header */
max_blocks = - (long)
((size+(SIZEOF_SYSTEM_PAGE-SIZEOF_OM_BIN_PAGE))+SIZEOF_SYSTEM_PAGE-1)
/ SIZEOF_SYSTEM_PAGE;
sizeW = ((-max_blocks*SIZEOF_SYSTEM_PAGE) -
(SIZEOF_SYSTEM_PAGE - SIZEOF_OM_BIN_PAGE)) / SIZEOF_LONG;
om_new_specBin = om_LargeBin;
}
else
{
/* SIZEOF_OM_BIN_PAGE == max_blocks*size + r1; r1 < size */
/* r1 = max_blocks*(size_padding) + r2; r2 < max_blocks */
max_blocks = SIZEOF_OM_BIN_PAGE / size;
sizeW = (SIZEOF_OM_BIN_PAGE % size) / max_blocks;
#ifdef OM_ALIGNMENT_NEEDS_WORK
if (align)
sizeW = ((size + sizeW) & ~ (SIZEOF_STRICT_ALIGNMENT - 1));
else
#endif
sizeW = ((size + sizeW) & ~ (SIZEOF_OM_ALIGNMENT - 1));
omAssume(sizeW >= size);
omAssume(max_blocks*sizeW <= SIZEOF_OM_BIN_PAGE);
omAssume((max_blocks+1)*sizeW > SIZEOF_OM_BIN_PAGE ||
max_blocks*(sizeW + SIZEOF_STRICT_ALIGNMENT) > SIZEOF_OM_BIN_PAGE);
sizeW = sizeW >> LOG_SIZEOF_LONG;
if (size > OM_MAX_BLOCK_SIZE)
{
om_new_specBin = om_LargeBin;
}
#ifdef OM_ALIGNMENT_NEEDS_WORK
else if (align)
{
om_new_specBin = omSmallSize2AlignedBin( size );
}
#endif
#ifdef OM_HAVE_TRACK
else if (track)
{
om_new_specBin = omSmallSize2TrackBin( size );
}
#endif
else
{
om_new_specBin = omSmallSize2Bin( size );
}
}
if (om_new_specBin == om_LargeBin ||
om_new_specBin->max_blocks < max_blocks)
{
omSpecBin s_bin;
#ifdef OM_HAVE_TRACK
if (track)
s_bin = omFindInSortedGList(om_SpecTrackBin, next, max_blocks, max_blocks);
else
#endif
s_bin = omFindInSortedGList(om_SpecBin, next, max_blocks, max_blocks);
if (s_bin != NULL)
{
(s_bin->ref)++;
omAssume(s_bin->bin != NULL &&
s_bin->bin->max_blocks == s_bin->max_blocks &&
s_bin->bin->sizeW == sizeW);
return s_bin->bin;
}
s_bin = (omSpecBin) omAlloc(sizeof(omSpecBin_t));
s_bin->ref = 1;
s_bin->next = NULL;
s_bin->max_blocks = max_blocks;
s_bin->bin = (omBin) omAlloc(sizeof(omBin_t));
s_bin->bin->current_page = om_ZeroPage;
s_bin->bin->last_page = NULL;
s_bin->bin->next = NULL;
s_bin->bin->sizeW = sizeW;
s_bin->bin->max_blocks = max_blocks;
s_bin->bin->sticky = 0;
#ifdef OM_HAVE_TRACK
if (track)
{
om_SpecTrackBin = omInsertInSortedGList(om_SpecTrackBin, next, max_blocks, s_bin);
}
else
#endif
om_SpecBin = omInsertInSortedGList(om_SpecBin, next, max_blocks, s_bin);
return s_bin->bin;
}
else
{
return om_new_specBin;
}
}
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210
SIZEOF_OM_BIN_PAGE
#define SIZEOF_OM_BIN_PAGE
Definition omAllocPrivate.h:32
omSmallSize2Bin
#define omSmallSize2Bin(size)
Definition omAllocPrivate.h:211
om_LargeBin
#define om_LargeBin
Definition omBin.c:25
omAssume
#define omAssume(x)
Definition omError.h:85
NULL
#define NULL
Definition omList.c:12
omInsertInSortedGList
#define omInsertInSortedGList(ptr, next, what, addr)
Definition omList.h:106
omFindInSortedGList
#define omFindInSortedGList(ptr, next, what, value)
Definition omList.h:108
omBin
omBin_t * omBin
Definition omStructs.h:12
omSpecBin
omSpecBin_t * omSpecBin
Definition omStructs.h:30
OM_MAX_BLOCK_SIZE
#define OM_MAX_BLOCK_SIZE
Definition omTables.c:31
OM_SIZEOF_UNIQUE_MAX_BLOCK_THRESHOLD
#define OM_SIZEOF_UNIQUE_MAX_BLOCK_THRESHOLD
Definition omTables.h:5
om_ZeroPage
omBinPage_t om_ZeroPage[]
Definition om_Alloc.c:19
omSmallSize2AlignedBin
#define omSmallSize2AlignedBin
Definition omtTestAlloc.c:29

## _omUnGetSpecBin()

void _omUnGetSpecBin | ( | omBin * | bin,
|  | int | force )

Definition at line 142 of file omBin.c.

{
omBin bin = *bin_p;
if (! omIsStaticBin(bin))
{
#ifdef OM_HAVE_TRACK
int track_bin = 0;
#endif
omSpecBin s_bin;
#ifdef OM_HAVE_TRACK
s_bin = omFindInGList(om_SpecTrackBin, next, bin, bin);
if (s_bin != NULL)
track_bin = 1;
else
#endif
s_bin = omFindInSortedGList(om_SpecBin, next, max_blocks, bin->max_blocks);
omAssume(s_bin != NULL && bin == s_bin->bin);
if (s_bin != NULL)
{
(s_bin->ref)--;
if (s_bin->ref == 0 || force)
{
#ifdef OM_HAVE_TRACK
if (! track_bin)
#endif
omFreeKeptAddrFromBin(s_bin->bin);
if(s_bin->bin->last_page == NULL || force)
{
#ifdef OM_HAVE_TRACK
if (track_bin)
om_SpecTrackBin = omRemoveFromSortedGList(om_SpecTrackBin, next, max_blocks, s_bin);
else
#endif
om_SpecBin = omRemoveFromSortedGList(om_SpecBin, next, max_blocks, s_bin);
omFreeSize(s_bin->bin, sizeof(omBin_t));
omFreeSize(s_bin, sizeof(omSpecBin_t));
}
}
}
}
*bin_p = NULL;
}
omFreeSize
#define omFreeSize(addr, size)
Definition omAllocDecl.h:260
omIsStaticBin
#define omIsStaticBin(bin)
Definition omBin.h:59
omFreeKeptAddrFromBin
void omFreeKeptAddrFromBin(omBin bin)
Definition omDebug.c:542
omRemoveFromSortedGList
#define omRemoveFromSortedGList(ptr, next, what, addr)
Definition omList.h:110

## omDeleteStickyAllBinTag()

void omDeleteStickyAllBinTag | ( | unsigned long | sticky | ) |

Definition at line 570 of file omBin.c.

{
omSpecBin s_bin = om_SpecBin;
int i;
for (i=0; i<=OM_MAX_BIN_INDEX; i++)
{
omDeleteStickyBinTag(&(om_StaticBin[i]), sticky);
}
while (s_bin != NULL)
{
omDeleteStickyBinTag(s_bin->bin, sticky);
s_bin = s_bin->next;
}
}
i
int i
Definition cfEzgcd.cc:132
omDeleteStickyBinTag
void omDeleteStickyBinTag(omBin bin, unsigned long sticky)
Definition omBin.c:339

## omDeleteStickyBinTag()

void omDeleteStickyBinTag | ( | omBin | bin,
|  | unsigned long | sticky )

Definition at line 339 of file omBin.c.

{
omBin no_sticky_bin = NULL;
omBin sticky_bin = NULL;
if (sticky == 0)
{
omAssume(0);
return;
}
sticky_bin = omGetStickyBin(bin, sticky);
if (sticky_bin != NULL)
{
no_sticky_bin = omGetStickyBin(bin, 0);
omAssume(no_sticky_bin != NULL && sticky_bin != no_sticky_bin);
omMergeStickyPages(no_sticky_bin, sticky_bin);
if (bin == sticky_bin)
{
sticky_bin = no_sticky_bin;
omSetStickyBinTag(bin, 0);
}
bin->next = omRemoveFromGList(bin->next, next, sticky_bin);
omFreeSize(sticky_bin, sizeof(omBin_t));
}
}
omSetStickyBinTag
void omSetStickyBinTag(omBin bin, unsigned long sticky_tag)
Definition omBin.c:237
omMergeStickyPages
static void omMergeStickyPages(omBin to_bin, omBin from_bin)
Definition omBin.c:267
omGetStickyBin
#define omGetStickyBin(bin, sticky_tag)
Definition omBin.c:193
omRemoveFromGList
#define omRemoveFromGList(ptr, next, addr)
Definition omList.h:102

## omGetNewStickyAllBinTag()

unsigned long omGetNewStickyAllBinTag | ( | void |  | ) |

Definition at line 486 of file omBin.c.

{
unsigned long sticky = 0, new_sticky;
int i;
omSpecBin s_bin;
// first, find new sticky tag
for (i=0; i<=OM_MAX_BIN_INDEX; i++)
{
new_sticky = omGetMaxStickyBinTag(&(om_StaticBin[i]));
if (new_sticky > sticky) sticky = new_sticky;
}
s_bin = om_SpecBin;
while (s_bin != NULL)
{
new_sticky = omGetMaxStickyBinTag(s_bin->bin);
if (new_sticky > sticky) sticky = new_sticky;
s_bin = s_bin->next;
}
if (sticky < BIT_SIZEOF_LONG - 2)
{
sticky++;
for (i=0; i<=OM_MAX_BIN_INDEX; i++)
{
omCreateStickyBin(&(om_StaticBin[i]), sticky);
}
s_bin = om_SpecBin;
while (s_bin != NULL)
{
omCreateStickyBin(s_bin->bin, sticky);
s_bin = s_bin->next;
}
return sticky;
}
else
{
omBin bin;
omAssume(sticky == BIT_SIZEOF_LONG - 1);
for (i=0; i<=OM_MAX_BIN_INDEX; i++)
{
bin = &om_StaticBin[i];
if (omGetStickyBin(bin, BIT_SIZEOF_LONG -1) == NULL)
omCreateStickyBin(bin, BIT_SIZEOF_LONG -1);
}
s_bin = om_SpecBin;
while (s_bin != NULL)
{
if (omGetStickyBin(s_bin->bin, BIT_SIZEOF_LONG -1) == NULL)
omCreateStickyBin(s_bin->bin, BIT_SIZEOF_LONG -1);
s_bin = s_bin->next;
}
return BIT_SIZEOF_LONG - 1;
}
}
BIT_SIZEOF_LONG
#define BIT_SIZEOF_LONG
Definition auxiliary.h:80
omGetMaxStickyBinTag
unsigned long omGetMaxStickyBinTag(omBin bin)
Definition omBin.c:209
omCreateStickyBin
static omBin omCreateStickyBin(omBin bin, unsigned long sticky)
Definition omBin.c:196

## omGetNewStickyBinTag()

unsigned long omGetNewStickyBinTag | ( | omBin | bin | ) |

Definition at line 221 of file omBin.c.

{
unsigned long sticky = omGetMaxStickyBinTag(bin);
if (sticky < BIT_SIZEOF_LONG - 2)
{
sticky++;
omCreateStickyBin(bin, sticky);
return sticky;
}
else
{
omAssume(sticky == BIT_SIZEOF_LONG - 1);
}
return sticky;
}

## omGetStickyBinOfBin()

omBin omGetStickyBinOfBin | ( | omBin | bin | ) |

Definition at line 375 of file omBin.c.

{
omBin new_bin = omAlloc(sizeof(omBin_t));
omAssume(omIsKnownTopBin(bin, 1) && ! omIsStickyBin(bin));
new_bin->sticky = SIZEOF_VOIDP;
new_bin->max_blocks = bin->max_blocks;
new_bin->sizeW = bin->sizeW;
new_bin->next = om_StickyBins;
om_StickyBins = new_bin;
new_bin->last_page = NULL;
new_bin->current_page = om_ZeroPage;
#if 0
if (omIsSpecBin(bin))
{
omSpecBin s_bin = omFindInSortedGList(om_SpecBin, next, max_blocks, bin->max_blocks);
omAssume(s_bin != NULL);
if (s_bin != NULL)
s_bin->ref++;
}
#endif
return new_bin;
}
om_StickyBins
omBin om_StickyBins
Definition omBin.c:374
omIsKnownTopBin
#define omIsKnownTopBin(bin, normal_bin)
Definition omBin.h:55
omIsSpecBin
#define omIsSpecBin(bin)
Definition omBin.h:47

## omGetUsedBinBytes()

long omGetUsedBinBytes | ( | void |  | ) |

Definition at line 763 of file omBin.c.

{
int i = OM_MAX_BIN_INDEX;
omSpecBin s_bin = om_SpecBin;
long used = 0;
omBin sticky;
for (; i>=0; i--)
{
used += omGetUsedBytesOfBin(&om_StaticBin[i]);
}
while (s_bin != NULL)
{
used += omGetUsedBytesOfBin(s_bin->bin);
s_bin = s_bin->next;
}
#ifdef OM_HAVE_TRACK
for (i=OM_MAX_BIN_INDEX; i>=0; i--)
{
used += omGetUsedBytesOfBin(&om_StaticTrackBin[i]);
}
s_bin = om_SpecTrackBin;
while (s_bin != NULL)
{
used += omGetUsedBytesOfBin(s_bin->bin);
s_bin = s_bin->next;
}
#endif
sticky = om_StickyBins;
while (sticky != NULL)
{
used += omGetUsedBytesOfBin(sticky);
sticky = sticky->next;
}
return used;
}
omGetUsedBytesOfBin
static long omGetUsedBytesOfBin(omBin bin)
Definition omBin.c:756

## omIsKnownTopBin()

int omIsKnownTopBin | ( | omBin | bin,
|  | int | normal_bin )

Definition at line 442 of file omBin.c.

{
omBin to_check;
omSpecBin s_bin;
int i;
omAssume(normal_bin == 1 || normal_bin == 0);
#ifdef OM_HAVE_TRACK
if (! normal_bin)
{
to_check = om_StaticTrackBin;
s_bin = om_SpecTrackBin;
}
else
#endif
{
omAssume(normal_bin);
to_check = om_StaticBin;
s_bin = om_SpecBin;
}
for (i=0; i<= OM_MAX_BIN_INDEX; i++)
{
if (bin == &(to_check[i]))
return 1;
}
while (s_bin != NULL)
{
if (bin == s_bin->bin) return 1;
s_bin = s_bin->next;
}
to_check = om_StickyBins;
while (to_check != NULL)
{
if (bin == to_check) return 1;
to_check = to_check->next;
}
return 0;
}

## omMergeStickyBinIntoBin()

void omMergeStickyBinIntoBin | ( | omBin | sticky_bin,
|  | omBin | into_bin )

Definition at line 398 of file omBin.c.

{
if (! omIsOnGList(om_StickyBins, next, sticky_bin) ||
!sticky_bin->sticky ||
sticky_bin->max_blocks != into_bin->max_blocks ||
sticky_bin == into_bin ||
!omIsKnownTopBin(into_bin, 1) ||
omIsStickyBin(into_bin))
{
#ifndef OM_NDEBUG
omReportError(omError_StickyBin, omError_NoError, OM_FLR,
(! omIsOnGList(om_StickyBins, next, sticky_bin) ? "unknown sticky_bin" :
(!sticky_bin->sticky ? "sticky_bin is not sticky" :
(sticky_bin->max_blocks != into_bin->max_blocks ? "sticky_bin and into_bin have different block sizes" :
(sticky_bin == into_bin ? "sticky_bin == into_bin" :
(!omIsKnownTopBin(into_bin, 1) ? "unknown into_bin" :
(omIsStickyBin(into_bin) ? "into_bin is sticky" :
"unknown sticky_bin error")))))));
#endif
return;
}
omFreeKeptAddrFromBin(sticky_bin);
om_StickyBins = omRemoveFromGList(om_StickyBins, next, sticky_bin);
omMergeStickyPages(into_bin, sticky_bin);
#if 0
if (! omIsStaticBin(into_bin))
{
omBin _ibin = into_bin;
omUnGetSpecBin(&_ibin);
}
#endif
omFreeSize(sticky_bin, sizeof(omBin_t));
#if defined(OM_INTERNAL_DEBUG) && !defined(OM_NDEBUG)
omTestBin(into_bin, 2);
#endif
}
omTestBin
omError_t omTestBin(omBin bin, int check_level)
Definition omDebug.c:90
omUnGetSpecBin
#define omUnGetSpecBin(bin_ptr)
Definition omBin.h:14
omReportError
omError_t omReportError(omError_t error, omError_t report_error, OM_FLR_DECL, const char *fmt,...)
Definition omError.c:80
omError_NoError
@ omError_NoError
Definition omError.h:18
omError_StickyBin
@ omError_StickyBin
Definition omError.h:41
omIsOnGList
#define omIsOnGList(ptr, next, addr)
Definition omList.h:100

## omPrintBinStats()

void omPrintBinStats | ( | FILE * | fd | ) |

Definition at line 694 of file omBin.c.

{
int i = OM_MAX_BIN_INDEX;
long pages=0, used_blocks=0, free_blocks=0;
long pages_p, used_blocks_p, free_blocks_p;
omSpecBin s_bin = om_SpecBin;
omBin sticky;
fputs(" SizeW\tBlocks\tUPages\tFBlocks\tUBlocks\tSticky\n",fd);
fflush(fd);
while (s_bin != NULL || i >= 0)
{
if (s_bin == NULL || (i >= 0 && (unsigned long) om_StaticBin[i].max_blocks < (unsigned long) s_bin->bin->max_blocks))
{
omPrintBinStat(fd, &om_StaticBin[i], 0, &pages_p, &used_blocks_p, &free_blocks_p);
pages += pages_p;
used_blocks += used_blocks_p;
free_blocks += free_blocks_p;
#ifdef OM_HAVE_TRACK
if (om_StaticTrackBin[i].current_page != om_ZeroPage)
{
omPrintBinStat(fd, &om_StaticTrackBin[i], 1, &pages_p, &used_blocks_p, &free_blocks_p);
pages += pages_p;
used_blocks += used_blocks_p;
free_blocks += free_blocks_p;
}
#endif
i--;
}
else
{
omPrintBinStat(fd, s_bin->bin,0, &pages_p, &used_blocks_p, &free_blocks_p);
pages += pages_p;
used_blocks += used_blocks_p;
free_blocks += free_blocks_p;
s_bin = s_bin->next;
}
}
#ifdef OM_HAVE_TRACK
s_bin = om_SpecTrackBin;
while (s_bin != NULL)
{
omPrintBinStat(fd, s_bin->bin, 0, &pages_p, &used_blocks_p, &free_blocks_p);
s_bin = s_bin->next;
pages += pages_p;
used_blocks += used_blocks_p;
free_blocks += free_blocks_p;
}
#endif
sticky = om_StickyBins;
while (sticky != NULL)
{
omPrintBinStat(fd, sticky, 0, &pages_p, &used_blocks_p, &free_blocks_p);
sticky = sticky->next;
pages += pages_p;
used_blocks += used_blocks_p;
free_blocks += free_blocks_p;
}
fputs("----------------------------------------\n",fd);
fprintf(fd, " \t \t%ld\t%ld\t%ld\n", pages, free_blocks, used_blocks);
}
omPrintBinStat
static void omPrintBinStat(FILE *fd, omBin bin, int track, long *pages, long *used_blocks, long *free_blocks)
Definition omBin.c:663
fd
int status int fd
Definition si_signals.h:69

## omSetStickyAllBinTag()

void omSetStickyAllBinTag | ( | unsigned long | sticky | ) |

Definition at line 540 of file omBin.c.

{
omSpecBin s_bin = om_SpecBin;
int i;
for (i=0; i<=OM_MAX_BIN_INDEX; i++)
{
omSetStickyBinTag(&(om_StaticBin[i]), sticky);
}
while (s_bin != NULL)
{
omSetStickyBinTag(s_bin->bin, sticky);
s_bin = s_bin->next;
}
}

## omSetStickyBinTag()

void omSetStickyBinTag | ( | omBin | bin,
|  | unsigned long | sticky )

Definition at line 237 of file omBin.c.

{
omBin s_bin;
s_bin = omGetStickyBin(bin, sticky_tag);
if (s_bin != bin)
{
omBinPage tc, tl;
unsigned long ts;
if (s_bin == NULL) s_bin = omCreateStickyBin(bin, sticky_tag);
ts = bin->sticky;
tl = bin->last_page;
tc = bin->current_page;
bin->sticky = s_bin->sticky;
bin->current_page = s_bin->current_page;
bin->last_page = s_bin->last_page;
s_bin->sticky = ts;
s_bin->last_page = tl;
s_bin->current_page = tc;
}
}
omBinPage
omBinPage_t * omBinPage
Definition omStructs.h:16

## omUnSetStickyAllBinTag()

void omUnSetStickyAllBinTag | ( | unsigned long | sticky | ) |

Definition at line 555 of file omBin.c.

{
omSpecBin s_bin = om_SpecBin;
int i;
for (i=0; i<=OM_MAX_BIN_INDEX; i++)
{
omUnSetStickyBinTag(&(om_StaticBin[i]), sticky);
}
while (s_bin != NULL)
{
omUnSetStickyBinTag(s_bin->bin, sticky);
s_bin = s_bin->next;
}
}
omUnSetStickyBinTag
void omUnSetStickyBinTag(omBin bin, unsigned long sticky)
Definition omBin.c:260

## omUnSetStickyBinTag()

void omUnSetStickyBinTag | ( | omBin | bin,
|  | unsigned long | sticky )

Definition at line 260 of file omBin.c.

{
omAssume(omGetStickyBin(bin, 0) != NULL);
if (bin->sticky == sticky)
omSetStickyBinTag(bin, 0);
}