Skip to content

Commit

Permalink
Merge pull request #6 from zakki/multicore-32bit
Browse files Browse the repository at this point in the history
Fix error on IA32
  • Loading branch information
kayceesrk committed Jun 8, 2015
2 parents 07f67d1 + 5969526 commit 45107e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions byterun/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ typedef uint64 uintnat;
/* An entire minor heap must fit inside one region
of size 1 << Minor_heap_align_bits, which determines
the maximum size of the heap */
#if SIZEOF_PTR <= 4
#define Minor_heap_align_bits 20
#else
#define Minor_heap_align_bits 24
#endif

/* Default size of the minor zone. (words) */
#define Minor_heap_def 262144
Expand Down
4 changes: 2 additions & 2 deletions byterun/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ void caml_plat_event_trigger(caml_plat_event* e)
#define Is_power_2(align) \
((align) != 0 && ((align) & ((align) - 1)) == 0)

static asize_t round_up(asize_t size, asize_t align) {
static uintnat round_up(uintnat size, uintnat align) {
Assert(Is_power_2(align));
return (size + align - 1) & ~(align - 1);
}


asize_t caml_mem_round_up_pages(asize_t size)
uintnat caml_mem_round_up_pages(uintnat size)
{
return round_up(size, sysconf(_SC_PAGESIZE));
}
Expand Down

0 comments on commit 45107e4

Please sign in to comment.