196{
198 s_bin->sticky = sticky;
201 s_bin->max_blocks = bin->max_blocks;
202 s_bin->sizeW = bin->sizeW;
203 s_bin->next = bin->next;
206}
207
209{
210 unsigned long sticky = 0;
211 do
212 {
213 if (bin->sticky > sticky) sticky = bin->sticky;
214 bin = bin->next;
215 }
217 return sticky;
218}
219
221{
224 {
225 sticky++;
227 return sticky;
228 }
229 else
230 {
232 }
233 return sticky;
234}
235
237{
240
242 {
244 unsigned long ts;
245
247 ts = bin->sticky;
248 tl = bin->last_page;
249 tc = bin->current_page;
250 bin->sticky =
s_bin->sticky;
251 bin->current_page =
s_bin->current_page;
252 bin->last_page =
s_bin->last_page;
254 s_bin->last_page = tl;
256 }
257}
258
260{
262 if (bin->sticky == sticky)
264}
265
267{
268#ifdef HAVE_OM_ASSUME
271#endif
272
276
278 do
279 {
283 }
284 while(1);
285
287 {
291 return;
292 }
293
296
298 {
300 {
304 return;
305 }
307 }
308 else
309 {
310
311
312
313 to_bin->current_page->used_blocks = 0;
314 }
315
316
319 to_bin->current_page->used_blocks == 0);
320
324 else
325 {
328 }
332
333#ifdef HAVE_OM_ASSUME
335#endif
336}
337
339{
342
343 if (sticky == 0)
344 {
346 return;
347 }
348
351 {
354
356
358 {
361 }
364 }
365}
366
367
368
369
370
371
372
375{
379 new_bin->max_blocks = bin->max_blocks;
385#if 0
387 {
392 }
393#endif
395}
396
398{
405 {
406#ifndef OM_NDEBUG
409 (!
sticky_bin->sticky ?
"sticky_bin is not sticky" :
410 (
sticky_bin->max_blocks !=
into_bin->max_blocks ?
"sticky_bin and into_bin have different block sizes" :
414 "unknown sticky_bin error")))))));
415#endif
416 return;
417 }
421
422#if 0
424 {
427 }
428#endif
430#if defined(OM_INTERNAL_DEBUG) && !defined(OM_NDEBUG)
432#endif
433}
434
435
436
437
438
439
440#ifndef OM_NDEBUG
442{
446
448
449#ifdef OM_HAVE_TRACK
451 {
454 }
455 else
456#endif
457 {
461 }
462
464 {
466 return 1;
467 }
468
470 {
471 if (bin ==
s_bin->bin)
return 1;
473 }
475
477 {
480 }
481 return 0;
482}
483#endif
484
486{
490
492 {
495 }
498 {
502 }
504 {
505 sticky++;
507 {
509 }
512 {
515 }
516 return sticky;
517 }
518 else
519 {
523 {
527 }
530 {
534 }
536 }
537}
538
540{
544 {
546 }
548 {
551 }
552}
553
555{
559 {
561 }
563 {
566 }
567}
568
570{
574 {
576 }
578 {
581 }
582}
583
584#if 0
586{
588
590 {
593
594 for (
i=0;
i<bin->max_blocks;
i++)
595 {
599 }
601 }
602}
603#endif
604
605
606
607
608
609
612{
615
618 {
619 pages++;
if (
where == 1)
620 {
622 if (bin->max_blocks > 0)
624 }
625 else
626 {
627 if (bin->max_blocks > 1)
628 used_blocks += bin->max_blocks;
629 else
630 used_blocks++;
631 }
632 if (
page == bin->current_page)
where = -1;
634 }
638}
639
642{
645
647 {
653 bin = bin->next;
654 else
656 }
660}
661
663{
665 {
667 }
668 else
669 {
673 (
long)bin->sizeW, bin->max_blocks);
674 }
678 {
681 {
684 (int) bin->sticky);
685 bin = bin->next;
689 }
690 }
691}
692
694{
700
701 fputs(
" SizeW\tBlocks\tUPages\tFBlocks\tUBlocks\tSticky\n",
fd);
704 {
706 {
711#ifdef OM_HAVE_TRACK
713 {
718 }
719#endif
721 }
722 else
723 {
729 }
730 }
731#ifdef OM_HAVE_TRACK
734 {
740 }
741#endif
743 while (sticky !=
NULL)
744 {
746 sticky = sticky->next;
750 }
751 fputs(
"----------------------------------------\n",
fd);
753}
754
756{
760}
761
763{
768
770 {
772 }
774 {
777 }
778#ifdef OM_HAVE_TRACK
780 {
782 }
785 {
788 }
789#endif
790
792 while (sticky !=
NULL)
793 {
795 sticky = sticky->next;
796 }
798}
799#endif
static BOOLEAN length(leftv result, leftv arg)
omError_t omTestBin(omBin bin, int check_level)
#define omFreeSize(addr, size)
#define omSetTopBinAndStickyOfPage(page, bin, sticky)
#define SIZEOF_OM_BIN_PAGE_HEADER
void omSetStickyBinTag(omBin bin, unsigned long sticky_tag)
static void omPrintBinStat(FILE *fd, omBin bin, int track, long *pages, long *used_blocks, long *free_blocks)
void omDeleteStickyBinTag(omBin bin, unsigned long sticky)
void omSetStickyAllBinTag(unsigned long sticky)
unsigned long omGetMaxStickyBinTag(omBin bin)
static void omMergeStickyPages(omBin to_bin, omBin from_bin)
#define omGetStickyBin(bin, sticky_tag)
static void omGetBinStat(omBin bin, long *pages_p, long *used_blocks_p, long *free_blocks_p)
static void omGetTotalBinStat(omBin bin, long *pages_p, long *used_blocks_p, long *free_blocks_p)
unsigned long omGetNewStickyBinTag(omBin bin)
static omBin omCreateStickyBin(omBin bin, unsigned long sticky)
void omDeleteStickyAllBinTag(unsigned long sticky)
void omUnSetStickyBinTag(omBin bin, unsigned long sticky)
void omUnSetStickyAllBinTag(unsigned long sticky)
unsigned long omGetNewStickyAllBinTag()
static long omGetUsedBytesOfBin(omBin bin)
#define omIsKnownTopBin(bin, normal_bin)
#define omIsStickyBin(bin)
#define omIsStaticBin(bin)
#define omIsStaticNormalBin(bin)
#define omUnGetSpecBin(bin_ptr)
#define omIsTrackBin(bin)
void omFreeKeptAddrFromBin(omBin bin)
#define omGetUsedBlocksOfPage(page)
omError_t omReportError(omError_t error, omError_t report_error, OM_FLR_DECL, const char *fmt,...)
#define omIsOnList(ptr, addr)
#define omRemoveFromGList(ptr, next, addr)
#define omGListLength(ptr, next)
#define omIsOnGList(ptr, next, addr)
#define omFindInSortedGList(ptr, next, what, value)
omBinPage_t om_ZeroPage[]
#define omGetStickyBinOfBin(B)
#define omMergeStickyBinIntoBin(A, B)
#define omPrintBinStats(F)