Functions
omDebugTrack.c File Reference
#include <mylimits.h>
#include <string.h>
#include "omConfig.h"
#include "omDerivedConfig.h"
#include "omalloc.h"

Go to the source code of this file.

Functions

int omIsInKeptAddrList (void *addr)
 

Function Documentation

◆ omIsInKeptAddrList()

int omIsInKeptAddrList ( void *  addr)

Definition at line 737 of file omDebugTrack.c.

738 {
739  void* ptr = om_KeptAddr;
740  int ret = 0;
741 
742 #ifdef OM_HAVE_TRACK
743  if (omIsTrackAddr(addr))
744  addr = omOutAddr_2_TrackAddr(addr);
745 #endif
746 
747  if (om_LastKeptAddr != NULL)
748  *((void**) om_LastKeptAddr) = om_AlwaysKeptAddrs;
749 
750  while (ptr != NULL)
751  {
752  if (ptr == addr)
753  {
754  ret = 1; break;
755  }
756  ptr = *((void**) ptr);
757  }
758 
759  if (om_LastKeptAddr != NULL)
760  *((void**) om_LastKeptAddr) = NULL;
761 
762  return ret;
763 }
void * om_KeptAddr
Definition: omDebug.c:28
#define omIsTrackAddr(addr)
Definition: omDebug.h:12
#define NULL
Definition: omList.c:10
void * om_AlwaysKeptAddrs
Definition: omDebug.c:31
void * om_LastKeptAddr
Definition: omDebug.c:30