summaryrefslogtreecommitdiffstats
path: root/byterun/memory.c
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2003-12-29 22:15:02 +0000
committerDamien Doligez <damien.doligez-inria.fr>2003-12-29 22:15:02 +0000
commit31943bac1db3351118c7f911db99bd567f02a883 (patch)
tree053244070a0a7f612d637a0547f0d851a2dd024a /byterun/memory.c
parentdbf40e0b61af6f34d4a2736be1f0562ee5e8a52f (diff)
depollution suite (PR#1914 et PR#1956); byterun/weak.c: PR#1929 suite
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6041 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/memory.c')
-rw-r--r--byterun/memory.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/byterun/memory.c b/byterun/memory.c
index 82773b6ea..a3c8e5b03 100644
--- a/byterun/memory.c
+++ b/byterun/memory.c
@@ -47,8 +47,8 @@ char *alloc_for_heap (asize_t request)
mem = aligned_mmap (request + sizeof (heap_chunk_head),
sizeof (heap_chunk_head), &block);
#else
- mem = aligned_malloc (request + sizeof (heap_chunk_head),
- sizeof (heap_chunk_head), &block);
+ mem = caml_aligned_malloc (request + sizeof (heap_chunk_head),
+ sizeof (heap_chunk_head), &block);
#endif
if (mem == NULL) return NULL;
mem += sizeof (heap_chunk_head);
@@ -93,10 +93,10 @@ int add_to_heap (char *m)
asize_t new_page_low = Page (m);
asize_t new_size = page_high - new_page_low;
- gc_message (0x08, "Growing page table to %lu entries\n", new_size);
+ caml_gc_message (0x08, "Growing page table to %lu entries\n", new_size);
block = malloc (new_size * sizeof (page_table_entry));
if (block == NULL){
- gc_message (0x08, "No room for growing page table\n", 0);
+ caml_gc_message (0x08, "No room for growing page table\n", 0);
return -1;
}
new_page_table = block - new_page_low;
@@ -111,10 +111,10 @@ int add_to_heap (char *m)
asize_t new_page_high = Page (m + Chunk_size (m));
asize_t new_size = new_page_high - page_low;
- gc_message (0x08, "Growing page table to %lu entries\n", new_size);
+ caml_gc_message (0x08, "Growing page table to %lu entries\n", new_size);
block = malloc (new_size * sizeof (page_table_entry));
if (block == NULL){
- gc_message (0x08, "No room for growing page table\n", 0);
+ caml_gc_message (0x08, "No room for growing page table\n", 0);
return -1;
}
new_page_table = block - page_low;
@@ -168,11 +168,11 @@ static char *expand_heap (mlsize_t request)
asize_t malloc_request;
malloc_request = round_heap_chunk_size (Bhsize_wosize (request));
- gc_message (0x04, "Growing heap to %luk bytes\n",
- (stat_heap_size + malloc_request) / 1024);
+ caml_gc_message (0x04, "Growing heap to %luk bytes\n",
+ (stat_heap_size + malloc_request) / 1024);
mem = alloc_for_heap (malloc_request);
if (mem == NULL){
- gc_message (0x04, "No room for growing heap\n", 0);
+ caml_gc_message (0x04, "No room for growing heap\n", 0);
return NULL;
}
Assert (Wosize_bhsize (malloc_request) >= request);
@@ -202,7 +202,7 @@ void shrink_heap (char *chunk)
if (chunk == heap_start) return;
stat_heap_size -= Chunk_size (chunk);
- gc_message (0x04, "Shrinking heap to %luk bytes\n", stat_heap_size / 1024);
+ caml_gc_message (0x04, "Shrinking heap to %luk bytes\n", stat_heap_size/1024);
#ifdef DEBUG
{
@@ -251,7 +251,7 @@ value alloc_shr (mlsize_t wosize, tag_t tag)
new_block = expand_heap (wosize);
if (new_block == NULL) {
if (in_minor_collection)
- fatal_error ("Fatal error: out of memory.\n");
+ caml_fatal_error ("Fatal error: out of memory.\n");
else
raise_out_of_memory ();
}