My Project
Loading...
Searching...
No Matches
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 743 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)
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;
769}
void * om_AlwaysKeptAddrs
Definition: omDebug.c:31
void * om_KeptAddr
Definition: omDebug.c:28
void * om_LastKeptAddr
Definition: omDebug.c:30
#define omIsTrackAddr(addr)
Definition: omDebug.h:12
#define NULL
Definition: omList.c:12