* src/alloc.c (cleanup_vector): Call jit_context_destroy () to destroy a
compiled function's associated context when it's pseudovector is destroyed.
#include <pthread.h>
#endif
+#ifdef HAVE_LIBJIT
+#include <jit.h>
+#endif
+
#include "lisp.h"
#include "dispextern.h"
#include "intervals.h"
finalize_one_mutex ((struct Lisp_Mutex *) vector);
else if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_CONDVAR))
finalize_one_condvar ((struct Lisp_CondVar *) vector);
+ else if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_COMPILED)
+ && (void *)vector->contents[COMPILED_JIT_ID] != NULL)
+ {
+ jit_function_t func =
+ (jit_function_t )vector->contents[COMPILED_JIT_ID];
+ jit_context_destroy (jit_function_get_context (func));
+ }
}
/* Reclaim space used by unmarked vectors. */