diff options
| author | Karl Heuer | 1996-01-05 10:03:17 +0000 |
|---|---|---|
| committer | Karl Heuer | 1996-01-05 10:03:17 +0000 |
| commit | 8e6208c5d2c91d70f2338d1c3d788e194c6c9d52 (patch) | |
| tree | 8f5bfe00dcb80384d562fad62d2166df9b06bec0 /src/ralloc.c | |
| parent | 34035df32674d5a6a4eb4112dfa5ea69b4dec64f (diff) | |
| download | emacs-8e6208c5d2c91d70f2338d1c3d788e194c6c9d52.tar.gz emacs-8e6208c5d2c91d70f2338d1c3d788e194c6c9d52.zip | |
Comment fixes.
Diffstat (limited to 'src/ralloc.c')
| -rw-r--r-- | src/ralloc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ralloc.c b/src/ralloc.c index b6fcb323395..9645bfd5f3f 100644 --- a/src/ralloc.c +++ b/src/ralloc.c | |||
| @@ -131,7 +131,7 @@ static int extra_bytes; | |||
| 131 | but they never move. | 131 | but they never move. |
| 132 | 132 | ||
| 133 | We try to make just one heap and make it larger as necessary. | 133 | We try to make just one heap and make it larger as necessary. |
| 134 | But sometimes we can't do that, because we can't get continguous | 134 | But sometimes we can't do that, because we can't get contiguous |
| 135 | space to add onto the heap. When that happens, we start a new heap. */ | 135 | space to add onto the heap. When that happens, we start a new heap. */ |
| 136 | 136 | ||
| 137 | typedef struct heap | 137 | typedef struct heap |
| @@ -171,7 +171,7 @@ static heap_ptr first_heap, last_heap; | |||
| 171 | An element with variable==NIL denotes a freed block, which has not yet | 171 | An element with variable==NIL denotes a freed block, which has not yet |
| 172 | been collected. They may only appear while r_alloc_freeze > 0, and will be | 172 | been collected. They may only appear while r_alloc_freeze > 0, and will be |
| 173 | freed when the arena is thawed. Currently, these blocs are not reusable, | 173 | freed when the arena is thawed. Currently, these blocs are not reusable, |
| 174 | while the arena is frozen. Very inefficent. */ | 174 | while the arena is frozen. Very inefficient. */ |
| 175 | 175 | ||
| 176 | typedef struct bp | 176 | typedef struct bp |
| 177 | { | 177 | { |
| @@ -180,7 +180,7 @@ typedef struct bp | |||
| 180 | POINTER *variable; | 180 | POINTER *variable; |
| 181 | POINTER data; | 181 | POINTER data; |
| 182 | SIZE size; | 182 | SIZE size; |
| 183 | POINTER new_data; /* tmporarily used for relocation */ | 183 | POINTER new_data; /* temporarily used for relocation */ |
| 184 | struct heap *heap; /* Heap this bloc is in. */ | 184 | struct heap *heap; /* Heap this bloc is in. */ |
| 185 | } *bloc_ptr; | 185 | } *bloc_ptr; |
| 186 | 186 | ||
| @@ -220,8 +220,8 @@ find_heap (address) | |||
| 220 | if we can get that many within one heap. | 220 | if we can get that many within one heap. |
| 221 | 221 | ||
| 222 | If enough space is not presently available in our reserve, this means | 222 | If enough space is not presently available in our reserve, this means |
| 223 | getting more page-aligned space from the system. If the retuned space | 223 | getting more page-aligned space from the system. If the returned space |
| 224 | is not contiguos to the last heap, allocate a new heap, and append it | 224 | is not contiguous to the last heap, allocate a new heap, and append it |
| 225 | 225 | ||
| 226 | obtain does not try to keep track of whether space is in use | 226 | obtain does not try to keep track of whether space is in use |
| 227 | or not in use. It just returns the address of SIZE bytes that | 227 | or not in use. It just returns the address of SIZE bytes that |
| @@ -795,7 +795,7 @@ r_alloc_sbrk (size) | |||
| 795 | { | 795 | { |
| 796 | /* Allocate a page-aligned space. GNU malloc would reclaim an | 796 | /* Allocate a page-aligned space. GNU malloc would reclaim an |
| 797 | extra space if we passed an unaligned one. But we could | 797 | extra space if we passed an unaligned one. But we could |
| 798 | not always find a space which is contiguos to the previous. */ | 798 | not always find a space which is contiguous to the previous. */ |
| 799 | POINTER new_bloc_start; | 799 | POINTER new_bloc_start; |
| 800 | heap_ptr h = first_heap; | 800 | heap_ptr h = first_heap; |
| 801 | SIZE get = ROUNDUP (size); | 801 | SIZE get = ROUNDUP (size); |
| @@ -978,7 +978,7 @@ r_alloc_free (ptr) | |||
| 978 | do nothing. | 978 | do nothing. |
| 979 | 979 | ||
| 980 | In case r_alloc_freeze is set, a new bloc is allocated, and the | 980 | In case r_alloc_freeze is set, a new bloc is allocated, and the |
| 981 | memory copied to it. Not very efficent. We could traverse the | 981 | memory copied to it. Not very efficient. We could traverse the |
| 982 | bloc_list for a best fit of free blocs first. | 982 | bloc_list for a best fit of free blocs first. |
| 983 | 983 | ||
| 984 | Change *PTR to reflect the new bloc, and return this value. | 984 | Change *PTR to reflect the new bloc, and return this value. |
| @@ -1077,7 +1077,7 @@ r_alloc_thaw () | |||
| 1077 | if (--r_alloc_freeze_level < 0) | 1077 | if (--r_alloc_freeze_level < 0) |
| 1078 | abort (); | 1078 | abort (); |
| 1079 | 1079 | ||
| 1080 | /* This frees all unused blocs. It is not too inefficent, as the resize | 1080 | /* This frees all unused blocs. It is not too inefficient, as the resize |
| 1081 | and bcopy is done only once. Afterwards, all unreferenced blocs are | 1081 | and bcopy is done only once. Afterwards, all unreferenced blocs are |
| 1082 | already shrunk to zero size. */ | 1082 | already shrunk to zero size. */ |
| 1083 | if (!r_alloc_freeze_level) | 1083 | if (!r_alloc_freeze_level) |