misc/alloc-monitor.c
static int exists(void *ptr) {
    struct list *l;

    LOCK(heap_pointers_lock);
    for (l = heap_pointers; l; l = l->next)
        if (ptr == l->value)
            break;
    UNLOCK(heap_pointers_lock);

    return !!l;
}
/* Returns 1 if this lock is in the current list of allocated pointers and 0
 * otherwise.
 */
Returns 1 if this lock is in the current list of allocated pointers and 0
otherwise.
Returns 1 if this lock is in the current list of allocated pointers and 0 otherwise .
static int exists(void *ptr) {
    struct list *l;
    LOCK(heap_pointers_lock);
    for (l = heap_pointers; l; l = l->next)
        if (ptr == l->value)
            break;
    UNLOCK(heap_pointers_lock);
    return !!l;
}
static int exists ( void * ptr ) { struct list * l ; LOCK ( heap_pointers_lock ) ; for ( l = heap_pointers ; l ; l = l -> next ) if ( ptr == l -> value ) break ; UNLOCK ( heap_pointers_lock ) ; return ! ! l ; }
Returns 1 if this lock is in the current list of allocated pointers and 0
 otherwise.
Returns 1 if this lock is in the current list of allocated pointers and 0 otherwise .