[MLton-commit] r4767
Matthew Fluet
fluet at mlton.org
Tue Oct 24 12:38:05 PDT 2006
Rename 'diskBack_*' functions to 'GC_diskBack_*', indicating that they are platform dependent functions used by the GC
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c 2006-10-24 19:30:11 UTC (rev 4766)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c 2006-10-24 19:37:58 UTC (rev 4767)
@@ -310,13 +310,13 @@
/* Write the heap to disk and try again. */
void *data;
- data = diskBack_write (orig, size);
+ data = GC_diskBack_write (orig, size);
releaseHeap (s, curHeapp);
if (createHeap (s, curHeapp, desiredSize, minSize)) {
- diskBack_read (data, curHeapp->start, size);
- diskBack_close (data);
+ GC_diskBack_read (data, curHeapp->start, size);
+ GC_diskBack_close (data);
} else {
- diskBack_close (data);
+ GC_diskBack_close (data);
if (s->controls.messages)
GC_displayMem ();
die ("Out of memory. Unable to allocate %s bytes.\n",
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c 2006-10-24 19:30:11 UTC (rev 4766)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/diskBack.unix.c 2006-10-24 19:37:58 UTC (rev 4767)
@@ -31,14 +31,14 @@
FILE *f;
} *WriteToDiskData;
-void diskBack_read (void *data, pointer buf, size_t size) {
+void GC_diskBack_read (void *data, pointer buf, size_t size) {
FILE *f;
f = ((WriteToDiskData)data)->f;
fread_safe (buf, 1, size, f);
}
-void diskBack_close (void *data) {
+void GC_diskBack_close (void *data) {
FILE *f;
f = ((WriteToDiskData)data)->f;
@@ -46,7 +46,7 @@
free (data);
}
-void *diskBack_write (pointer buf, size_t size) {
+void *GC_diskBack_write (pointer buf, size_t size) {
FILE *f;
WriteToDiskData d;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c 2006-10-24 19:30:11 UTC (rev 4766)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c 2006-10-24 19:37:58 UTC (rev 4767)
@@ -1,4 +1,4 @@
-HANDLE fileDesHandle (int fd);
+iHANDLE fileDesHandle (int fd);
#define BUFSIZE 65536
@@ -30,7 +30,7 @@
HANDLE handle;
} *WriteToDiskData;
-void diskBack_read (void *data, pointer buf, size_t size) {
+void GC_diskBack_read (void *data, pointer buf, size_t size) {
HANDLE h;
DWORD d;
DWORD dwBytesRead;
@@ -43,7 +43,7 @@
die ("ReadFile failed with error %ld\n", GetLastError());
}
-void diskBack_close (void *data) {
+void GC_diskBack_close (void *data) {
HANDLE h;
h = ((WriteToDiskData)data)->handle;
@@ -52,7 +52,7 @@
free (data);
}
-void *diskBack_write (pointer buf, size_t size) {
+void *GC_diskBack_write (pointer buf, size_t size) {
HANDLE h;
WriteToDiskData d;
DWORD dwBytesWritten;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-10-24 19:30:11 UTC (rev 4766)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-10-24 19:37:58 UTC (rev 4767)
@@ -156,9 +156,9 @@
void GC_setCygwinUseMmap (bool b);
-void diskBack_close (void *data);
-void diskBack_read (void *data, pointer buf, size_t size);
-void *diskBack_write (pointer buf, size_t size);
+void GC_diskBack_close (void *data);
+void GC_diskBack_read (void *data, pointer buf, size_t size);
+void *GC_diskBack_write (pointer buf, size_t size);
/* ------------------------------------------------- */
/* Text Segment */
More information about the MLton-commit
mailing list