Remove some bogus assertions that don't work in preallocated modes, tidy up
authorNick Downing <nick@ndcode.org>
Sun, 31 Mar 2019 07:45:24 +0000 (18:45 +1100)
committerNick Downing <nick@ndcode.org>
Sun, 31 Mar 2019 07:45:24 +0000 (18:45 +1100)
core.h
process.c
swap.h

diff --git a/core.h b/core.h
index 1c6e971..d707e05 100644 (file)
--- a/core.h
+++ b/core.h
@@ -4,7 +4,7 @@
 #include <stdint.h>
 #include "pool.h"
 
-//#define INDIRECT_CORE 1
+#define INDIRECT_CORE 1
 #define MOVEABLE_CORE 1
 #define BLOCK_SIZE 0x1000
 
index 159d834..a6f0f23 100644 (file)
--- a/process.c
+++ b/process.c
@@ -319,7 +319,6 @@ bool process_alloc(struct process *process, int size) {
 
   // free up as much core as we need to
   swap_out = size - core_avail();
-  assert(swap_out <= swap_avail());
   do_swap_out(swap_out);
 
   // allocate core and possible swap
@@ -405,11 +404,9 @@ bool process_realloc(struct process *process, int size) {
 
   // free up as much core as we need to
   swap_out = size_change - core_avail();
-  assert(swap_out <= swap_avail());
   do_swap_out(swap_out);
 
   // reallocate core and possible swap
-  // allocate core and possible swap
 #ifdef MOVEABLE_CORE
   rassert(
     core_table_realloc(
diff --git a/swap.h b/swap.h
index 384ad49..9c887ba 100644 (file)
--- a/swap.h
+++ b/swap.h
@@ -4,7 +4,7 @@
 #include <stdint.h>
 #include "pool.h"
 
-#define INDIRECT_SWAP 1
+//#define INDIRECT_SWAP 1
 //#define MOVEABLE_SWAP 1
 
 #ifdef MOVEABLE_SWAP