Skip to content

Commit

Permalink
cosmetique
Browse files Browse the repository at this point in the history
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3867 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information
doligez committed Oct 9, 2001
1 parent cb06eb1 commit a2f11c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion byterun/major_gc.c
Expand Up @@ -387,7 +387,7 @@ void init_major_heap (asize_t heap_size)
page_table [i] = In_heap;
}

Hd_hp (heap_start) = Make_header (Wosize_bhsize (stat_heap_size), 0, Caml_blue);
Hd_hp (heap_start) = Make_header (Wosize_bhsize(stat_heap_size),0,Caml_blue);
fl_init_merge ();
fl_merge_block (Bp_hp (heap_start));
gc_phase = Phase_idle;
Expand Down
10 changes: 5 additions & 5 deletions byterun/memory.c
Expand Up @@ -56,10 +56,10 @@ void free_for_heap (header_t *mem)

/* Take a block of memory as argument, which must be the result of a
call to [alloc_for_heap], and insert it into the heap chaining.
The contents of the block must be a sequence of valid objects and
fragments: no space between objects and no trailing garbage. If
some objects are blue, they must be added to the free list by the
caller. All other objects must have the color [allocation_color(mem)].
The contents of the block must be a sequence of valid blocks and
fragments: no space between blocks and no trailing garbage. If
some blocks are blue, they must be added to the free list by the
caller. All other blocks must have the color [allocation_color(mem)].
The caller must update [allocated_words] if applicable.
Return value: 0 if no error; -1 in case of error.
*/
Expand Down Expand Up @@ -291,7 +291,7 @@ void adjust_gc_speed (mlsize_t mem, mlsize_t max)
A block value [v] is a shared block if and only if [Is_in_heap (v)]
is true.
*/
/* [initialize] never calls the GC, so you may call it while an object is
/* [initialize] never calls the GC, so you may call it while an block is
unfinished (i.e. just after a call to [alloc_shr].) */
void initialize (value *fp, value val)
{
Expand Down
6 changes: 6 additions & 0 deletions byterun/memory.h
Expand Up @@ -70,6 +70,12 @@ color_t allocation_color (void *hp);
unless you are sure the value being overwritten is not a shared block and
the value being written is not a young block. */
/* [Modify] never calls the GC. */
/* [Modify] can also be used to do assignment on data structures that are
not in the (major) heap. In this case, it is a bit slower than
simple assignment.
In particular, you can use [Modify] when you don't know whether the
block being changed is in the minor heap or the major heap.
*/

#define Modify(fp, val) do{ \
value _old_ = *(fp); \
Expand Down

0 comments on commit a2f11c8

Please sign in to comment.