Functions
omDebugTrack.c File Reference
#include <limits.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 741 of file omDebugTrack.c.

742 {
743  void* ptr = om_KeptAddr;
744  int ret = 0;
745 
746 #ifdef OM_HAVE_TRACK
747  if (omIsTrackAddr(addr))
748  addr = omOutAddr_2_TrackAddr(addr);
749 #endif
750 
751  if (om_LastKeptAddr != NULL)
752  *((void**) om_LastKeptAddr) = om_AlwaysKeptAddrs;
753 
754  while (ptr != NULL)
755  {
756  if (ptr == addr)
757  {
758  ret = 1; break;
759  }
760  ptr = *((void**) ptr);
761  }
762 
763  if (om_LastKeptAddr != NULL)
764  *((void**) om_LastKeptAddr) = NULL;
765 
766  return ret;
767 }
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