mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-21 22:59:16 +02:00
Fix compiler warnings on 32-bit x86
This commit is contained in:
parent
12b19a7b07
commit
2733a08f55
2 changed files with 9 additions and 9 deletions
2
Makefile
2
Makefile
|
@ -5,7 +5,7 @@
|
||||||
include Makefile.config
|
include Makefile.config
|
||||||
|
|
||||||
CYCLONE = cyclone
|
CYCLONE = cyclone
|
||||||
TESTSCM = unit-tests
|
TESTSCM = unit-tests srfi-60-tests
|
||||||
TESTFILES = $(addprefix tests/, $(addsuffix .scm, $(TESTSCM)))
|
TESTFILES = $(addprefix tests/, $(addsuffix .scm, $(TESTSCM)))
|
||||||
BOOTSTRAP_DIR = ../cyclone-bootstrap
|
BOOTSTRAP_DIR = ../cyclone-bootstrap
|
||||||
|
|
||||||
|
|
16
gc.c
16
gc.c
|
@ -229,8 +229,8 @@ gc_heap *gc_heap_create(int heap_type, size_t size, size_t max_size,
|
||||||
h->next_free = h;
|
h->next_free = h;
|
||||||
h->last_alloc_size = 0;
|
h->last_alloc_size = 0;
|
||||||
//h->free_size = size;
|
//h->free_size = size;
|
||||||
ck_pr_add_ptr(&(thd->cached_heap_total_sizes[heap_type]), size);
|
ck_pr_add_ptr(&(thd->cached_heap_total_sizes[heap_type]), (void *)size);
|
||||||
ck_pr_add_ptr(&(thd->cached_heap_free_sizes[heap_type]), size);
|
ck_pr_add_ptr(&(thd->cached_heap_free_sizes[heap_type]), (void *)size);
|
||||||
h->chunk_size = chunk_size;
|
h->chunk_size = chunk_size;
|
||||||
h->max_size = max_size;
|
h->max_size = max_size;
|
||||||
h->data = (char *)gc_heap_align(sizeof(h->data) + (uintptr_t) & (h->data));
|
h->data = (char *)gc_heap_align(sizeof(h->data) + (uintptr_t) & (h->data));
|
||||||
|
@ -564,7 +564,7 @@ void *gc_try_alloc(gc_heap * h, int heap_type, size_t size, char *obj,
|
||||||
gc_copy_obj(f2, obj, thd);
|
gc_copy_obj(f2, obj, thd);
|
||||||
//h->free_size -= gc_allocated_bytes(obj, NULL, NULL);
|
//h->free_size -= gc_allocated_bytes(obj, NULL, NULL);
|
||||||
ck_pr_sub_ptr(&(thd->cached_heap_free_sizes[heap_type]),
|
ck_pr_sub_ptr(&(thd->cached_heap_free_sizes[heap_type]),
|
||||||
gc_allocated_bytes(obj, NULL, NULL));
|
(void *)gc_allocated_bytes(obj, NULL, NULL));
|
||||||
}
|
}
|
||||||
h_passed->next_free = h;
|
h_passed->next_free = h;
|
||||||
h_passed->last_alloc_size = size;
|
h_passed->last_alloc_size = size;
|
||||||
|
@ -910,7 +910,7 @@ size_t gc_sweep(gc_heap * h, int heap_type, size_t * sum_freed_ptr, gc_thread_da
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//h->free_size += heap_freed;
|
//h->free_size += heap_freed;
|
||||||
ck_pr_add_ptr(&(thd->cached_heap_free_sizes[heap_type]), heap_freed);
|
ck_pr_add_ptr(&(thd->cached_heap_free_sizes[heap_type]), (void *)heap_freed);
|
||||||
// Free the heap page if possible.
|
// Free the heap page if possible.
|
||||||
//
|
//
|
||||||
// With huge heaps, this becomes more important. one of the huge
|
// With huge heaps, this becomes more important. one of the huge
|
||||||
|
@ -931,8 +931,8 @@ size_t gc_sweep(gc_heap * h, int heap_type, size_t * sum_freed_ptr, gc_thread_da
|
||||||
gc_heap *new_h = gc_heap_free(h, prev_h);
|
gc_heap *new_h = gc_heap_free(h, prev_h);
|
||||||
if (new_h) { // Ensure free succeeded
|
if (new_h) { // Ensure free succeeded
|
||||||
h = new_h;
|
h = new_h;
|
||||||
ck_pr_sub_ptr(&(thd->cached_heap_free_sizes[heap_type] ), h_size);
|
ck_pr_sub_ptr(&(thd->cached_heap_free_sizes[heap_type] ), (void *)h_size);
|
||||||
ck_pr_sub_ptr(&(thd->cached_heap_total_sizes[heap_type]), h_size);
|
ck_pr_sub_ptr(&(thd->cached_heap_total_sizes[heap_type]), (void *)h_size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sum_freed += heap_freed;
|
sum_freed += heap_freed;
|
||||||
|
@ -1752,9 +1752,9 @@ void gc_merge_all_heaps(gc_thread_data *dest, gc_thread_data *src)
|
||||||
if (hdest && hsrc) {
|
if (hdest && hsrc) {
|
||||||
gc_heap_merge(hdest, hsrc);
|
gc_heap_merge(hdest, hsrc);
|
||||||
ck_pr_add_ptr(&(dest->cached_heap_total_sizes[heap_type]),
|
ck_pr_add_ptr(&(dest->cached_heap_total_sizes[heap_type]),
|
||||||
ck_pr_load_ptr(&(src->cached_heap_total_sizes[heap_type])));
|
(void *)ck_pr_load_ptr(&(src->cached_heap_total_sizes[heap_type])));
|
||||||
ck_pr_add_ptr(&(dest->cached_heap_free_sizes[heap_type]),
|
ck_pr_add_ptr(&(dest->cached_heap_free_sizes[heap_type]),
|
||||||
ck_pr_load_ptr(&(src->cached_heap_free_sizes[heap_type])));
|
(void *)ck_pr_load_ptr(&(src->cached_heap_free_sizes[heap_type])));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef GC_DEBUG_TRACE
|
#ifdef GC_DEBUG_TRACE
|
||||||
|
|
Loading…
Add table
Reference in a new issue