 |
My Project
debian-1:4.1.1-p2+ds-4
|
Go to the source code of this file.
|
#define | omGetAlignedSpecBin(size) _omGetSpecBin(size, 1, 0) |
|
#define | omGetSpecBin(size) _omGetSpecBin(size, 0, 0) |
|
#define | omUnGetSpecBin(bin_ptr) _omUnGetSpecBin(bin_ptr, 0) |
|
#define | omDeleteSpecBin(bin_ptr) _omUnGetSpecBin(bin_ptr, 1) |
|
#define | omIsStickyBin(bin) (bin->sticky >= SIZEOF_VOIDP) |
|
#define | omIsStaticNormalBin(bin) |
|
#define | omIsNormalBin(bin) omIsStaticNormalBin(bin) || omFindInGList(om_SpecBin, next, bin, bin) || omIsStickyBin(bin) |
|
#define | omIsSpecBin(bin) (!omIsStaticNormalBin(bin) && !omIsStickyBin(bin)) |
|
#define | omIsKnownTopBin(bin, normal_bin) 1 |
|
#define | omIsStaticTrackBin(bin) 0 |
|
#define | omIsTrackBin(bin) 0 |
|
#define | omIsStaticBin(bin) omIsStaticNormalBin(bin) || omIsStaticTrackBin(bin) |
|
◆ omDeleteSpecBin
◆ omGetAlignedSpecBin
◆ omGetSpecBin
◆ omIsKnownTopBin
#define omIsKnownTopBin |
( |
|
bin, |
|
|
|
normal_bin |
|
) |
| 1 |
◆ omIsNormalBin
◆ omIsSpecBin
◆ omIsStaticBin
◆ omIsStaticNormalBin
#define omIsStaticNormalBin |
( |
|
bin | ) |
|
Value:((
unsigned long) bin >= ((
unsigned long) &
om_StaticBin[0]) && \
Definition at line 42 of file omBin.h.
◆ omIsStaticTrackBin
#define omIsStaticTrackBin |
( |
|
bin | ) |
0 |
◆ omIsStickyBin
#define omIsStickyBin |
( |
|
bin | ) |
(bin->sticky >= SIZEOF_VOIDP) |
◆ omIsTrackBin
#define omIsTrackBin |
( |
|
bin | ) |
0 |
◆ omUnGetSpecBin
◆ _omGetSpecBin()
omBin _omGetSpecBin |
( |
size_t |
size, |
|
|
int |
align, |
|
|
int |
track |
|
) |
| |
Definition at line 22 of file omBin.c.
33 #ifdef OM_ALIGNMENT_NEEDS_WORK
49 sizeW = ((-max_blocks*SIZEOF_SYSTEM_PAGE) -
59 #ifdef OM_ALIGNMENT_NEEDS_WORK
61 sizeW = ((
size + sizeW) & ~ (SIZEOF_STRICT_ALIGNMENT - 1));
64 sizeW = ((
size + sizeW) & ~ (SIZEOF_OM_ALIGNMENT - 1));
71 sizeW = sizeW >> LOG_SIZEOF_LONG;
76 #ifdef OM_ALIGNMENT_NEEDS_WORK
85 om_new_specBin = omSmallSize2TrackBin(
size );
95 om_new_specBin->max_blocks < max_blocks)
109 s_bin->bin->max_blocks == s_bin->max_blocks &&
110 s_bin->bin->sizeW == sizeW);
116 s_bin->max_blocks = max_blocks;
119 s_bin->bin->last_page =
NULL;
120 s_bin->bin->next =
NULL;
121 s_bin->bin->sizeW = sizeW;
122 s_bin->bin->max_blocks = max_blocks;
123 s_bin->bin->sticky = 0;
136 return om_new_specBin;
◆ _omUnGetSpecBin()
void _omUnGetSpecBin |
( |
omBin * |
bin, |
|
|
int |
force |
|
) |
| |
Definition at line 138 of file omBin.c.
162 if (s_bin->ref == 0 || force)
168 if(s_bin->bin->last_page ==
NULL || force)
◆ omDeleteStickyAllBinTag()
void omDeleteStickyAllBinTag |
( |
unsigned long |
sticky | ) |
|
◆ omDeleteStickyBinTag()
void omDeleteStickyBinTag |
( |
omBin |
bin, |
|
|
unsigned long |
sticky |
|
) |
| |
Definition at line 334 of file omBin.c.
349 if (sticky_bin !=
NULL)
352 omAssume(no_sticky_bin !=
NULL && sticky_bin != no_sticky_bin);
356 if (bin == sticky_bin)
358 sticky_bin = no_sticky_bin;
◆ omGetNewStickyAllBinTag()
unsigned long omGetNewStickyAllBinTag |
( |
| ) |
|
Definition at line 479 of file omBin.c.
486 unsigned long sticky = 0, new_sticky;
493 if (new_sticky > sticky) sticky = new_sticky;
496 while (s_bin !=
NULL)
499 if (new_sticky > sticky) sticky = new_sticky;
510 while (s_bin !=
NULL)
528 while (s_bin !=
NULL)
◆ omGetNewStickyBinTag()
unsigned long omGetNewStickyBinTag |
( |
omBin |
bin | ) |
|
◆ omGetStickyBinOfBin()
Definition at line 369 of file omBin.c.
377 new_bin->sticky = SIZEOF_VOIDP;
378 new_bin->max_blocks = bin->max_blocks;
379 new_bin->sizeW = bin->sizeW;
382 new_bin->last_page =
NULL;
◆ omGetUsedBinBytes()
long omGetUsedBinBytes |
( |
| ) |
|
Definition at line 755 of file omBin.c.
756 long pages = 0, used_blocks = 0, free_blocks = 0;
758 return (used_blocks)*((long)bin->sizeW)*SIZEOF_LONG;
772 while (s_bin !=
NULL)
782 s_bin = om_SpecTrackBin;
783 while (s_bin !=
NULL)
791 while (sticky !=
NULL)
◆ omIsKnownTopBin()
int omIsKnownTopBin |
( |
omBin |
bin, |
|
|
int |
normal_bin |
|
) |
| |
Definition at line 435 of file omBin.c.
446 omAssume(normal_bin == 1 || normal_bin == 0);
451 to_check = om_StaticTrackBin;
452 s_bin = om_SpecTrackBin;
464 if (bin == &(to_check[
i]))
468 while (s_bin !=
NULL)
470 if (bin == s_bin->bin)
return 1;
475 while (to_check !=
NULL)
◆ omMergeStickyBinIntoBin()
void omMergeStickyBinIntoBin |
( |
omBin |
sticky_bin, |
|
|
omBin |
into_bin |
|
) |
| |
Definition at line 392 of file omBin.c.
399 !sticky_bin->sticky ||
400 sticky_bin->max_blocks != into_bin->max_blocks ||
401 sticky_bin == into_bin ||
408 (!sticky_bin->sticky ?
"sticky_bin is not sticky" :
409 (sticky_bin->max_blocks != into_bin->max_blocks ?
"sticky_bin and into_bin have different block sizes" :
410 (sticky_bin == into_bin ?
"sticky_bin == into_bin" :
413 "unknown sticky_bin error")))))));
424 omBin _ibin = into_bin;
◆ omPrintBinStats()
void omPrintBinStats |
( |
FILE * |
fd | ) |
|
Definition at line 686 of file omBin.c.
695 long pages=0, used_blocks=0, free_blocks=0;
696 long pages_p, used_blocks_p, free_blocks_p;
700 fputs(
" SizeW\tBlocks\tUPages\tFBlocks\tUBlocks\tSticky\n",
fd);
702 while (s_bin !=
NULL ||
i >= 0)
704 if (s_bin ==
NULL || (
i >= 0 && (
unsigned long)
om_StaticBin[
i].max_blocks < (
unsigned long) s_bin->bin->max_blocks))
708 used_blocks += used_blocks_p;
709 free_blocks += free_blocks_p;
713 omPrintBinStat(
fd, &om_StaticTrackBin[
i], 1, &pages_p, &used_blocks_p, &free_blocks_p);
715 used_blocks += used_blocks_p;
716 free_blocks += free_blocks_p;
725 used_blocks += used_blocks_p;
726 free_blocks += free_blocks_p;
731 s_bin = om_SpecTrackBin;
732 while (s_bin !=
NULL)
734 omPrintBinStat(
fd, s_bin->bin, 0, &pages_p, &used_blocks_p, &free_blocks_p);
737 used_blocks += used_blocks_p;
738 free_blocks += free_blocks_p;
742 while (sticky !=
NULL)
745 sticky = sticky->next;
◆ omSetStickyAllBinTag()
void omSetStickyAllBinTag |
( |
unsigned long |
sticky | ) |
|
◆ omSetStickyBinTag()
void omSetStickyBinTag |
( |
omBin |
bin, |
|
|
unsigned long |
sticky |
|
) |
| |
Definition at line 232 of file omBin.c.
248 tc = bin->current_page;
249 bin->sticky = s_bin->sticky;
250 bin->current_page = s_bin->current_page;
251 bin->last_page = s_bin->last_page;
253 s_bin->last_page = tl;
◆ omUnSetStickyAllBinTag()
void omUnSetStickyAllBinTag |
( |
unsigned long |
sticky | ) |
|
◆ omUnSetStickyBinTag()
void omUnSetStickyBinTag |
( |
omBin |
bin, |
|
|
unsigned long |
sticky |
|
) |
| |
void omFreeKeptAddrFromBin(omBin bin)
void omDeleteStickyBinTag(omBin bin, unsigned long sticky)
static void omPrintBinStat(FILE *fd, omBin bin, int track, long *pages, long *used_blocks, long *free_blocks)
#define omIsOnGList(ptr, next, addr)
#define omIsStaticBin(bin)
omError_t omReportError(omError_t error, omError_t report_error, OM_FLR_DECL, const char *fmt,...)
#define omRemoveFromGList(ptr, next, addr)
#define omSmallSize2AlignedBin
static void omMergeStickyPages(omBin to_bin, omBin from_bin)
#define omInsertInSortedGList(ptr, next, what, addr)
#define omGetStickyBin(bin, sticky_tag)
#define OM_MAX_BLOCK_SIZE
#define omFindInSortedGList(ptr, next, what, value)
#define omFreeSize(addr, size)
static long omGetUsedBytesOfBin(omBin bin)
#define omSmallSize2Bin(size)
#define OM_SIZEOF_UNIQUE_MAX_BLOCK_THRESHOLD
unsigned long omGetMaxStickyBinTag(omBin bin)
omBinPage_t om_ZeroPage[]
#define omUnGetSpecBin(bin_ptr)
#define SIZEOF_OM_BIN_PAGE
#define omRemoveFromSortedGList(ptr, next, what, addr)
#define omFindInGList(ptr, next, what, value)
void omSetStickyBinTag(omBin bin, unsigned long sticky_tag)
static omBin omCreateStickyBin(omBin bin, unsigned long sticky)
int omIsKnownTopBin(omBin bin, int normal_bin)
static void omGetTotalBinStat(omBin bin, long *pages_p, long *used_blocks_p, long *free_blocks_p)
void omUnSetStickyBinTag(omBin bin, unsigned long sticky)
#define omIsStickyBin(bin)