Commit 35aaa1ea authored by Dmitry Antipov's avatar Dmitry Antipov

Special MEM_TYPE_SPARE to denote reserved memory.

* alloc.c (enum mem_type): New memory type.
(refill_memory_reserve): Use new type for spare memory.
This prevents live_cons_p and live_string_p from incorrect
detection of uninitialized objects from spare memory as live.
parent 77f1f99c
2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
Special MEM_TYPE_SPARE to denote reserved memory.
* alloc.c (enum mem_type): New memory type.
(refill_memory_reserve): Use new type for spare memory.
This prevents live_cons_p and live_string_p from incorrect
detection of uninitialized objects from spare memory as live.
2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
Spelling fixes.
......
......@@ -305,7 +305,9 @@ enum mem_type
and runtime slowdown. Minor but pointless. */
MEM_TYPE_VECTORLIKE,
/* Special type to denote vector blocks. */
MEM_TYPE_VECTOR_BLOCK
MEM_TYPE_VECTOR_BLOCK,
/* Special type to denote reserved memory. */
MEM_TYPE_SPARE
};
static void *lisp_malloc (size_t, enum mem_type);
......@@ -3816,22 +3818,22 @@ refill_memory_reserve (void)
spare_memory[0] = malloc (SPARE_MEMORY);
if (spare_memory[1] == 0)
spare_memory[1] = lisp_align_malloc (sizeof (struct cons_block),
MEM_TYPE_CONS);
MEM_TYPE_SPARE);
if (spare_memory[2] == 0)
spare_memory[2] = lisp_align_malloc (sizeof (struct cons_block),
MEM_TYPE_CONS);
MEM_TYPE_SPARE);
if (spare_memory[3] == 0)
spare_memory[3] = lisp_align_malloc (sizeof (struct cons_block),
MEM_TYPE_CONS);
MEM_TYPE_SPARE);
if (spare_memory[4] == 0)
spare_memory[4] = lisp_align_malloc (sizeof (struct cons_block),
MEM_TYPE_CONS);
MEM_TYPE_SPARE);
if (spare_memory[5] == 0)
spare_memory[5] = lisp_malloc (sizeof (struct string_block),
MEM_TYPE_STRING);
MEM_TYPE_SPARE);
if (spare_memory[6] == 0)
spare_memory[6] = lisp_malloc (sizeof (struct string_block),
MEM_TYPE_STRING);
MEM_TYPE_SPARE);
if (spare_memory[0] && spare_memory[1] && spare_memory[5])
Vmemory_full = Qnil;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment