| 607 | } |
| 608 | |
| 609 | void omFreeKeptAddr() |
| 610 | { |
| 611 | void* next; |
| 612 | omBin bin; |
| 613 | omTrackFlags_t flags; |
| 614 | void* addr = om_KeptAddr; |
| 615 | |
| 616 | if (om_LastKeptAddr != NULL) |
| 617 | *((void**) om_LastKeptAddr) = om_AlwaysKeptAddrs; |
| 618 | |
| 619 | om_NumberOfKeptAddrs = 0; |
| 620 | om_LastKeptAddr = NULL; |
| 621 | om_AlwaysKeptAddrs = NULL; |
| 622 | om_KeptAddr = NULL; |
| 623 | |
| 624 | while (addr != NULL) |
| 625 | { |
| 626 | next = *((void**)addr); |
| 627 | bin = omGetOrigSpecBinOfAddr(addr); |
| 628 | |
| 629 | #ifdef OM_HAVE_TRACK |
| 630 | if (omIsTrackAddr(addr)) |
| 631 | { |
| 632 | omMarkAsFreeTrackAddr(addr, 0, &flags, OM_FLR); |
| 633 | omFreeTrackAddr(addr); |
| 634 | } |
| 635 | else |
| 636 | #endif |
| 637 | __omFree(addr); |
| 638 | |
| 639 | addr = next; |
| 640 | if (bin != NULL) omUnGetSpecBin(&bin); |
| 641 | } |
| 642 | } |
| 643 | |
| 644 | #endif /* ! OM_NDEBUG */ |