[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/lisp.h [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/lisp.h [emacs-unicode-2] |
Date: |
Wed, 27 Oct 2004 02:27:08 -0400 |
Index: emacs/src/lisp.h
diff -c emacs/src/lisp.h:1.465.2.11 emacs/src/lisp.h:1.465.2.12
*** emacs/src/lisp.h:1.465.2.11 Fri Oct 22 10:13:34 2004
--- emacs/src/lisp.h Wed Oct 27 06:03:06 2004
***************
*** 3307,3313 ****
extern Lisp_Object safe_alloca_unwind (Lisp_Object);
#define USE_SAFE_ALLOCA \
! int sa_count = SPECPDL_INDEX ()
/* SAFE_ALLOCA allocates a simple buffer. */
--- 3307,3313 ----
extern Lisp_Object safe_alloca_unwind (Lisp_Object);
#define USE_SAFE_ALLOCA \
! int sa_count = SPECPDL_INDEX (), sa_must_free = 0
/* SAFE_ALLOCA allocates a simple buffer. */
***************
*** 3318,3323 ****
--- 3318,3324 ----
else \
{ \
buf = (type) xmalloc (size); \
+ sa_must_free++; \
record_unwind_protect (safe_alloca_unwind, \
make_save_value (buf, 0)); \
} \
***************
*** 3325,3334 ****
/* SAFE_FREE frees xmalloced memory and enables GC as needed. */
! #define SAFE_FREE(size) \
do { \
! if ((size) >= MAX_ALLOCA) \
unbind_to (sa_count, Qnil); \
} while (0)
--- 3326,3337 ----
/* SAFE_FREE frees xmalloced memory and enables GC as needed. */
! #define SAFE_FREE() \
do { \
! if (sa_must_free) { \
! sa_must_free = 0; \
unbind_to (sa_count, Qnil); \
+ } \
} while (0)
***************
*** 3345,3361 ****
buf = (Lisp_Object *) xmalloc (size_); \
arg_ = make_save_value (buf, nelt); \
XSAVE_VALUE (arg_)->dogc = 1; \
record_unwind_protect (safe_alloca_unwind, arg_); \
} \
} while (0)
- #define SAFE_FREE_LISP(nelt) \
- do { \
- if (((nelt) * sizeof (Lisp_Object)) >= MAX_ALLOCA) \
- unbind_to (sa_count, Qnil); \
- } while (0)
-
-
#endif /* EMACS_LISP_H */
--- 3348,3358 ----
buf = (Lisp_Object *) xmalloc (size_); \
arg_ = make_save_value (buf, nelt); \
XSAVE_VALUE (arg_)->dogc = 1; \
+ sa_must_free++; \
record_unwind_protect (safe_alloca_unwind, arg_); \
} \
} while (0)
#endif /* EMACS_LISP_H */