comparison src/alloc.c @ 71967:3254b987edcb

(buffer_memory_full, memory_full): Use xsignal. Remove loop. (list1): New function.
author Kim F. Storm <storm@cua.dk>
date Tue, 18 Jul 2006 13:25:40 +0000
parents 272487a77b8e
children 107f9a044a0a 8a8e69664178
comparison
equal deleted inserted replaced
71966:df9c2080845c 71967:3254b987edcb
557 memory_full (); 557 memory_full ();
558 #endif 558 #endif
559 559
560 /* This used to call error, but if we've run out of memory, we could 560 /* This used to call error, but if we've run out of memory, we could
561 get infinite recursion trying to build the string. */ 561 get infinite recursion trying to build the string. */
562 while (1) 562 xsignal (Qnil, Vmemory_signal_data);
563 Fsignal (Qnil, Vmemory_signal_data);
564 } 563 }
565 564
566 565
567 #ifdef XMALLOC_OVERRUN_CHECK 566 #ifdef XMALLOC_OVERRUN_CHECK
568 567
2775 while (tail) 2774 while (tail)
2776 tail = tail->u.chain; 2775 tail = tail->u.chain;
2777 #endif 2776 #endif
2778 } 2777 }
2779 2778
2780 /* Make a list of 2, 3, 4 or 5 specified objects. */ 2779 /* Make a list of 1, 2, 3, 4 or 5 specified objects. */
2780
2781 Lisp_Object
2782 list1 (arg1)
2783 Lisp_Object arg1;
2784 {
2785 return Fcons (arg1, Qnil);
2786 }
2781 2787
2782 Lisp_Object 2788 Lisp_Object
2783 list2 (arg1, arg2) 2789 list2 (arg1, arg2)
2784 Lisp_Object arg1, arg2; 2790 Lisp_Object arg1, arg2;
2785 { 2791 {
3491 bytes_used_when_full = BYTES_USED; 3497 bytes_used_when_full = BYTES_USED;
3492 #endif 3498 #endif
3493 3499
3494 /* This used to call error, but if we've run out of memory, we could 3500 /* This used to call error, but if we've run out of memory, we could
3495 get infinite recursion trying to build the string. */ 3501 get infinite recursion trying to build the string. */
3496 while (1) 3502 xsignal (Qnil, Vmemory_signal_data);
3497 Fsignal (Qnil, Vmemory_signal_data);
3498 } 3503 }
3499 3504
3500 /* If we released our reserve (due to running out of memory), 3505 /* If we released our reserve (due to running out of memory),
3501 and we have a fair amount free once again, 3506 and we have a fair amount free once again,
3502 try to set aside another reserve in case we run out once more. 3507 try to set aside another reserve in case we run out once more.