static POINTER break_value;
/* This is the size of a page. We round memory requests to this boundary. */
-static int page_size;
+static size_t page_size;
/* Whenever we get memory from the system, get this many extra bytes. This
must be a multiple of page_size. */
}
if (! heap)
- abort ();
+ ABORT ();
/* If we can't fit SIZE bytes in that heap,
try successive later heaps. */
/* This heap should have no blocs in it. */
if (last_heap->first_bloc != NIL_BLOC
|| last_heap->last_bloc != NIL_BLOC)
- abort ();
+ ABORT ();
/* Return the last heap, with its header, to the system. */
excess = (char *)last_heap->end - (char *)last_heap->start;
}
if ((*real_morecore) (- excess) == 0)
- abort ();
+ ABORT ();
}
}
/* No need to ever call this if arena is frozen, bug somewhere! */
if (r_alloc_freeze_level)
- abort();
+ ABORT();
while (b)
{
/* No need to ever call this if arena is frozen, bug somewhere! */
if (r_alloc_freeze_level)
- abort();
+ ABORT();
if (bloc == NIL_BLOC || size == bloc->size)
return 1;
}
if (heap == NIL_HEAP)
- abort ();
+ ABORT ();
old_size = bloc->size;
bloc->size = size;
}
else /* size < 0 */
{
- size_t excess = (char *)first_heap->bloc_start
+ EMACS_INT excess = (char *)first_heap->bloc_start
- ((char *)virtual_break_value + size);
address = virtual_break_value;
dead_bloc = find_bloc (ptr);
if (dead_bloc == NIL_BLOC)
- abort ();
+ ABORT ();
free_bloc (dead_bloc);
*ptr = 0;
bloc = find_bloc (ptr);
if (bloc == NIL_BLOC)
- abort ();
+ ABORT ();
if (size < bloc->size)
{
init_ralloc ();
if (--r_alloc_freeze_level < 0)
- abort ();
+ ABORT ();
/* This frees all unused blocs. It is not too inefficient, as the resize
and memmove is done only once. Afterwards, all unreferenced blocs are
first_heap->start = first_heap->bloc_start
= virtual_break_value = break_value = (*real_morecore) (0);
if (break_value == NIL)
- abort ();
+ ABORT ();
page_size = PAGE;
extra_bytes = ROUNDUP (50000);
{
if (p->addr == addr)
{
- if (p->sz != sz) abort(); /* ACK! Shouldn't happen at all. */
+ if (p->sz != sz) ABORT(); /* ACK! Shouldn't happen at all. */
munmap( (VM_ADDR) p->addr, p->sz );
p->flag = empty;
break;
}
}
- if (!p) abort(); /* Can't happen... we've got a block to free which is not in
+ if (!p) ABORT(); /* Can't happen... we've got a block to free which is not in
the address list. */
Coalesce_Addr_Blocks();
}
switch(r_alloc_initialized)
{
case 0:
- abort();
+ ABORT();
case 1:
*ptr = (POINTER) UNDERLYING_MALLOC(size);
break;
{
switch( r_alloc_initialized) {
case 0:
- abort();
+ ABORT();
case 1:
UNDERLYING_FREE( *ptr ); /* Certain this is from the heap. */
{
if (r_alloc_initialized == 0)
{
- abort ();
+ ABORT ();
return 0; /* suppress compiler warning */
}
else if (r_alloc_initialized == 1)
if (r_alloc_initialized > 1)
return; /* used to return 1 */
+#ifdef PDUMP
+ /* Under pdump, we need to activate ralloc on the first go. */
+ ++r_alloc_initialized;
+#endif
if (++r_alloc_initialized == 1)
return; /* used to return 1 */