Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add vm_msync function in libmac, but the implementation remains void…

…. This allows ar to run an to work correctly (as far as I saw) but would need some real investigation.
  • Loading branch information...
commit 939035d09df6499894e55098bb83fa085caf5a59 1 parent 4bb503b
OznOg authored
Showing with 13 additions and 3 deletions.
  1. +13 −3 libmac/mac.c
View
16 libmac/mac.c
@@ -265,17 +265,27 @@ int mach_port_deallocate() {
return 0;
}
+/* FIXME implement vm_function corectly.
+ * OznOg Obviosly, all this remain completelly wrong because completely void.
+ * This functions allow programs to start correctly and usually to run (almost)
+ * correctly, but the memory managment remains wrong. I do not really have good ideas
+ * to handle all this without reimplementing the whole memory managment now. Feel free
+ * to give me some good ideas.
+ * I do not think implementing vm_allocate vm_deallocate and vm_msync is a priority
+ * but I guess some programs really need them to work correctly.
+ */
+int vm_msync(int target_task, void** addr, size_t size, int flags) {
+ return 0;
+}
+
int vm_allocate(int target_task, void** addr, size_t size, int flags) {
- //fprintf(stderr, "vm_allocate: size=%lu\n", size);
*addr = calloc(size, 1);
return 0;
}
int vm_deallocate() {
// TODO(hamaji): munmap, maybe
- //fprintf(stderr, "vm_deallocate()\n");
return 0;
- //abort();
}
void *__darwin_mmap(void *addr, size_t length, int prot, int flags,
Please sign in to comment.
Something went wrong with that request. Please try again.