summaryrefslogtreecommitdiff
path: root/reclaim.c
diff options
context:
space:
mode:
authorivmai <ivmai>2009-10-17 12:12:52 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:50 +0200
commit8274f8d1e2e748fba76be6ddf2d09c105e7af778 (patch)
tree6ade0316134cce3c7699fe77b8be651391bed1c5 /reclaim.c
parent454d418dec1eda78f7dedfebeec978a87d6ff773 (diff)
2009-10-17 Ivan Maidanski <ivmai@mail.ru>
* alloc.c (GC_never_stop_func, GC_check_fl_marks, GC_finish_collection): Reformat the code (make opening bracket style uniform across the file). * allchblk.c (GC_allochblk): Ditto. * backgraph.c (add_edge): Ditto. * dbg_mlc.c (GC_marked_for_finalization): Ditto. * dyn_load.c (GC_register_dynamic_libraries, GC_init_dyld): Ditto. * finalize.c (GC_null_finalize_mark_proc): Ditto. * gc_dlopen.c (GC_dlopen): Ditto. * mark.c (GC_push_marked1, GC_push_marked2, GC_push_marked4): Ditto. * misc.c (looping_handler, GC_call_with_gc_active, GC_do_blocking_inner, GC_do_blocking): Ditto. * os_dep.c (GC_get_main_stack_base, GC_read_dirty): Ditto. * pthread_support.c (GC_pthread_create, GC_pthread_sigmask, GC_pthread_join, GC_pthread_detach, GC_check_tls, GC_do_blocking_inner, GC_call_with_gc_active): Ditto. * reclaim.c (GC_reclaim_clear, GC_reclaim_block, GC_print_free_list): Ditto. * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty, GC_remove_protection): Reformat the code (wrap long lines).
Diffstat (limited to 'reclaim.c')
-rw-r--r--reclaim.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/reclaim.c b/reclaim.c
index 555c99c..efa49a5 100644
--- a/reclaim.c
+++ b/reclaim.c
@@ -124,7 +124,7 @@ STATIC ptr_t GC_reclaim_clear(struct hblk *hbp, hdr *hhdr, size_t sz,
plim = (word *)(hbp->hb_body + HBLKSIZE - sz);
/* go through all words in block */
- while( p <= plim ) {
+ while (p <= plim) {
if( mark_bit_from_hdr(hhdr, bit_no) ) {
p = (word *)((ptr_t)p + sz);
} else {
@@ -169,7 +169,7 @@ STATIC ptr_t GC_reclaim_uninit(struct hblk *hbp, hdr *hhdr, size_t sz,
plim = (word *)((ptr_t)hbp + HBLKSIZE - sz);
/* go through all words in block */
- while( p <= plim ) {
+ while (p <= plim) {
if( !mark_bit_from_hdr(hhdr, bit_no) ) {
n_bytes_found += sz;
/* object is available - put on list */
@@ -194,7 +194,7 @@ STATIC void GC_reclaim_check(struct hblk *hbp, hdr *hhdr, word sz)
plim = p + HBLKSIZE - sz;
/* go through all words in block */
- while( p <= plim ) {
+ while (p <= plim) {
if( !mark_bit_from_hdr(hhdr, bit_no) ) {
GC_add_leaked(p);
}
@@ -309,7 +309,7 @@ STATIC void GC_reclaim_block(struct hblk *hbp, word report_if_found)
} else if (empty) {
GC_bytes_found += HBLKSIZE;
GC_freehblk(hbp);
- } else if (GC_find_leak || !GC_block_nearly_full(hhdr)){
+ } else if (GC_find_leak || !GC_block_nearly_full(hhdr)) {
/* group of smaller objects, enqueue the real work */
rlh = &(ok -> ok_reclaim_list[BYTES_TO_GRANULES(sz)]);
hhdr -> hb_next = *rlh;
@@ -438,9 +438,9 @@ void GC_print_free_list(int kind, size_t sz_in_granules)
struct hblk *lastBlock = 0;
int n = 0;
- while (flh){
+ while (flh) {
struct hblk *block = HBLKPTR(flh);
- if (block != lastBlock){
+ if (block != lastBlock) {
GC_printf("\nIn heap block at %p:\n\t", block);
lastBlock = block;
}