Block-based vector allocation of small vectors.
[bpt/emacs.git] / src / lisp.h
index 551c154..acadcf5 100644 (file)
@@ -916,11 +916,15 @@ struct vectorlike_header
   {
     ptrdiff_t size;
 
-    /* Pointer to the next vector-like object.  It is generally a buffer or a
+    /* When the vector is allocated from a vector block, NBYTES is used
+       if the vector is not on a free list, and VECTOR is used otherwise.
+       For large vector-like objects, BUFFER or VECTOR is used as a pointer
+       to the next vector-like object.  It is generally a buffer or a 
        Lisp_Vector alias, so for convenience it is a union instead of a
        pointer: this way, one can write P->next.vector instead of ((struct
        Lisp_Vector *) P->next).  */
     union {
+      ptrdiff_t nbytes;
       struct buffer *buffer;
       struct Lisp_Vector *vector;
     } next;
@@ -2758,6 +2762,10 @@ extern void replace_range_2 (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t,
 extern void syms_of_insdel (void);
 
 /* Defined in dispnew.c */
+#if (defined PROFILING \
+     && (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__))
+void __executable_start (void) NO_RETURN;
+#endif
 extern Lisp_Object selected_frame;
 extern Lisp_Object Vwindow_system;
 EXFUN (Fding, 1);
@@ -2871,7 +2879,6 @@ EXFUN (Fpurecopy, 1);
 extern Lisp_Object make_pure_string (const char *, ptrdiff_t, ptrdiff_t, int);
 extern Lisp_Object make_pure_c_string (const char *data);
 extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object);
-extern Lisp_Object make_pure_vector (ptrdiff_t);
 EXFUN (Fgarbage_collect, 0);
 EXFUN (Fmake_byte_code, MANY);
 EXFUN (Fmake_bool_vector, 2);
@@ -2907,6 +2914,7 @@ extern void *r_alloc (void **, size_t);
 extern void r_alloc_free (void **);
 extern void *r_re_alloc (void **, size_t);
 extern void r_alloc_reset_variable (void **, void **);
+extern void r_alloc_inhibit_buffer_relocation (int);
 #endif
 
 /* Defined in chartab.c */
@@ -3000,7 +3008,7 @@ extern void init_lread (void);
 extern void syms_of_lread (void);
 
 /* Defined in eval.c.  */
-extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro;
+extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qmacro;
 extern Lisp_Object Qinhibit_quit, Qclosure;
 extern Lisp_Object Qand_rest;
 extern Lisp_Object Vautoload_queue;