My Project  debian-1:4.1.2-p1+ds-2
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 742 of file omDebugTrack.c.

744 {
745  void* ptr = om_KeptAddr;
746  int ret = 0;
747 
748 #ifdef OM_HAVE_TRACK
749  if (omIsTrackAddr(addr))
750  addr = omOutAddr_2_TrackAddr(addr);
751 #endif
752 
753  if (om_LastKeptAddr != NULL)
754  *((void**) om_LastKeptAddr) = om_AlwaysKeptAddrs;
755 
756  while (ptr != NULL)
757  {
758  if (ptr == addr)
759  {
760  ret = 1; break;
761  }
762  ptr = *((void**) ptr);
763  }
764 
765  if (om_LastKeptAddr != NULL)
766  *((void**) om_LastKeptAddr) = NULL;
767 
768  return ret;
om_AlwaysKeptAddrs
void * om_AlwaysKeptAddrs
Definition: omDebug.c:30
omIsTrackAddr
#define omIsTrackAddr(addr)
Definition: omDebug.h:11
NULL
#define NULL
Definition: omList.c:11
om_KeptAddr
void * om_KeptAddr
Definition: omDebug.c:27
om_LastKeptAddr
void * om_LastKeptAddr
Definition: omDebug.c:29