but they never move.
We try to make just one heap and make it larger as necessary.
- But sometimes we can't do that, because we can't get continguous
+ But sometimes we can't do that, because we can't get contiguous
space to add onto the heap. When that happens, we start a new heap. */
typedef struct heap
An element with variable==NIL denotes a freed block, which has not yet
been collected. They may only appear while r_alloc_freeze > 0, and will be
freed when the arena is thawed. Currently, these blocs are not reusable,
- while the arena is frozen. Very inefficent. */
+ while the arena is frozen. Very inefficient. */
typedef struct bp
{
POINTER *variable;
POINTER data;
SIZE size;
- POINTER new_data; /* tmporarily used for relocation */
+ POINTER new_data; /* temporarily used for relocation */
struct heap *heap; /* Heap this bloc is in. */
} *bloc_ptr;
if we can get that many within one heap.
If enough space is not presently available in our reserve, this means
- getting more page-aligned space from the system. If the retuned space
- is not contiguos to the last heap, allocate a new heap, and append it
+ getting more page-aligned space from the system. If the returned space
+ is not contiguous to the last heap, allocate a new heap, and append it
obtain does not try to keep track of whether space is in use
or not in use. It just returns the address of SIZE bytes that
{
/* Allocate a page-aligned space. GNU malloc would reclaim an
extra space if we passed an unaligned one. But we could
- not always find a space which is contiguos to the previous. */
+ not always find a space which is contiguous to the previous. */
POINTER new_bloc_start;
heap_ptr h = first_heap;
SIZE get = ROUNDUP (size);
do nothing.
In case r_alloc_freeze is set, a new bloc is allocated, and the
- memory copied to it. Not very efficent. We could traverse the
+ memory copied to it. Not very efficient. We could traverse the
bloc_list for a best fit of free blocs first.
Change *PTR to reflect the new bloc, and return this value.
if (--r_alloc_freeze_level < 0)
abort ();
- /* This frees all unused blocs. It is not too inefficent, as the resize
+ /* This frees all unused blocs. It is not too inefficient, as the resize
and bcopy is done only once. Afterwards, all unreferenced blocs are
already shrunk to zero size. */
if (!r_alloc_freeze_level)