Function: suspicious-object

suspicious-object is a function defined in alloc.c.

Signature

(suspicious-object OBJ)

Documentation

Return OBJ, maybe marking it for extra scrutiny.

If Emacs is compiled with suspicious object checking, capture a stack trace when OBJ is freed in order to help track down garbage collection bugs. Otherwise, do nothing and return OBJ.

Source Code

// Defined in /usr/src/emacs/src/alloc.c
{
#ifdef SUSPICIOUS_OBJECT_CHECKING
  /* Right now, we care only about vectors.  */
  if (VECTORLIKEP (obj))
    {
      suspicious_objects[suspicious_object_index++] = XVECTOR (obj);
      if (suspicious_object_index == ARRAYELTS (suspicious_objects))
	suspicious_object_index = 0;
    }
#endif
  return obj;
}