moveable_pool.git
4 years agoUnify process_alloc() and process_realloc() with PROCESS_ALLOC_MODE_REALLOC bit master
Nick Downing [Sat, 8 Jun 2019 06:21:36 +0000 (16:21 +1000)]
Unify process_alloc() and process_realloc() with PROCESS_ALLOC_MODE_REALLOC bit

4 years agoChange clunky swap allocation stuff to use a normal realloc, but suppress copy
Nick Downing [Sat, 8 Jun 2019 05:56:35 +0000 (15:56 +1000)]
Change clunky swap allocation stuff to use a normal realloc, but suppress copy

4 years agoSimplify pool_alloc() calling convention so that offset is always specified for POOL_...
Nick Downing [Sat, 8 Jun 2019 05:39:07 +0000 (15:39 +1000)]
Simplify pool_alloc() calling convention so that offset is always specified for POOL_ALLOC_MODE_REALLOC, remove some special cases meant to aovid the move_up()

4 years agoChange process_realloc() calling convention to be the same as process_alloc()
Nick Downing [Sat, 8 Jun 2019 01:50:40 +0000 (11:50 +1000)]
Change process_realloc() calling convention to be the same as process_alloc()

4 years agoChange process->in_core_blocks to process->in_core_block relative to block_base
Nick Downing [Sat, 8 Jun 2019 01:31:15 +0000 (11:31 +1000)]
Change process->in_core_blocks to process->in_core_block relative to block_base

4 years agoFix wrong #ifdef INDIRECT_SWAP
Nick Downing [Sat, 8 Jun 2019 01:25:54 +0000 (11:25 +1000)]
Fix wrong #ifdef INDIRECT_SWAP

4 years agoMake do_swap_read_write(), do_swap_out(), and process_run() use process_calc()
Nick Downing [Wed, 5 Jun 2019 13:59:19 +0000 (23:59 +1000)]
Make do_swap_read_write(), do_swap_out(), and process_run() use process_calc()

4 years agoReplace process->para, process->paras with process->para_base, process->para_limit...
Nick Downing [Tue, 4 Jun 2019 14:17:09 +0000 (00:17 +1000)]
Replace process->para, process->paras with process->para_base, process->para_limit such that these can be arbitrary (including negative) implying some fixed origin that keeps its relationship to the backing store under resizing, where previously process->para was restricted to the range 0..BLOCK_PARAS-1, rewrite horrible process_get_state() to process_calc() which converts these to blocks, majorly revamp the test script generator and runner to work natively with this scheme

4 years agoChange process_get_state() calling convention slightly, replaces core_base and swap_b...
Nick Downing [Mon, 3 Jun 2019 11:30:47 +0000 (21:30 +1000)]
Change process_get_state() calling convention slightly, replaces core_base and swap_base with core_block and swap_block, makes core_para and swap_para absolute

4 years agoGive do_swap_read_write() routine more context so it can later do clipping etc
Nick Downing [Mon, 3 Jun 2019 11:10:41 +0000 (21:10 +1000)]
Give do_swap_read_write() routine more context so it can later do clipping etc

4 years agoRationalize use of core_blocks (becomes: block) and swap_blocks (becomes: swap_in...
Nick Downing [Mon, 3 Jun 2019 11:06:32 +0000 (21:06 +1000)]
Rationalize use of core_blocks (becomes: block) and swap_blocks (becomes: swap_in when swapping in, unnecessary when swapping out), remove core_base, swap_base

4 years agoMake swap_move() only be defined for INDIRECT_SWAP where it only moves the table...
Nick Downing [Mon, 3 Jun 2019 09:35:51 +0000 (19:35 +1000)]
Make swap_move() only be defined for INDIRECT_SWAP where it only moves the table memory, replace core_to_swap_copy() and swap_to_core_copy() with swap_read_write() which works in blocks and takes a direction flag, implement do_swap_read_write() to abstract out the swapping code which is independent of the direction

4 years agoChange process->swap_blocks to process->core_blocks, stored iff INDIRECT_CORE
Nick Downing [Sun, 2 Jun 2019 10:38:33 +0000 (20:38 +1000)]
Change process->swap_blocks to process->core_blocks, stored iff INDIRECT_CORE

4 years agoFix minor spacing issue
Nick Downing [Sun, 2 Jun 2019 10:08:22 +0000 (20:08 +1000)]
Fix minor spacing issue

4 years agoSimplify the swap-in and swap-out loops, since have enough status information in...
Nick Downing [Sun, 2 Jun 2019 06:29:29 +0000 (16:29 +1000)]
Simplify the swap-in and swap-out loops, since have enough status information in the process that we do not need special loop entry code for new process/victim

4 years agoMake all processes be in LRU list, with victim pointer separating fully in core proce...
Nick Downing [Sun, 2 Jun 2019 04:34:05 +0000 (14:34 +1000)]
Make all processes be in LRU list, with victim pointer separating fully in core processes from fully in swap processes, processes before pointer must have a core item (non-INDIRECT_CORE), process immediately before pointer may be partially swapped, and processes on/after pointer have no core item (non-INDIRECT_CORE)

4 years agoMake PROCESS_FLAGS_CORE_ITEM only maintained for non-INDIRECT_CORE (moveable)
Nick Downing [Sun, 2 Jun 2019 03:56:16 +0000 (13:56 +1000)]
Make PROCESS_FLAGS_CORE_ITEM only maintained for non-INDIRECT_CORE (moveable)

4 years agoMake victim be LRU not process pointer, and use &lru_head instead of NULL
Nick Downing [Sun, 2 Jun 2019 03:39:27 +0000 (13:39 +1000)]
Make victim be LRU not process pointer, and use &lru_head instead of NULL

4 years agoGet rid of runner pointer, was only needed for process_get_state() during move
Nick Downing [Sun, 2 Jun 2019 03:27:36 +0000 (13:27 +1000)]
Get rid of runner pointer, was only needed for process_get_state() during move

4 years agoSimplify process_free() and process_get_state() so that we rely completely on process...
Nick Downing [Sun, 2 Jun 2019 03:15:57 +0000 (13:15 +1000)]
Simplify process_free() and process_get_state() so that we rely completely on process->swap_blocks to distinguish between fully in core, runner, victim, etc

4 years agoCosmetic issue in a diagnostic printf()
Nick Downing [Sun, 2 Jun 2019 02:30:47 +0000 (12:30 +1000)]
Cosmetic issue in a diagnostic printf()

4 years agoFor INDIRECT_CORE make process_realloc() free the physical blocks before resize
Nick Downing [Sun, 2 Jun 2019 02:29:57 +0000 (12:29 +1000)]
For INDIRECT_CORE make process_realloc() free the physical blocks before resize

4 years agoFor INDIRECT_CORE defer swap out until after successful table memory allocation
Nick Downing [Sun, 2 Jun 2019 02:21:22 +0000 (12:21 +1000)]
For INDIRECT_CORE defer swap out until after successful table memory allocation

4 years agoImplement the core_move_up() routine for INDIRECT_CORE, needed for realloc_base
Nick Downing [Sun, 2 Jun 2019 02:17:06 +0000 (12:17 +1000)]
Implement the core_move_up() routine for INDIRECT_CORE, needed for realloc_base

4 years agoTidy up process_alloc() / process_realloc() allocating/freeing physical blocks
Nick Downing [Sun, 2 Jun 2019 01:55:28 +0000 (11:55 +1000)]
Tidy up process_alloc() / process_realloc() allocating/freeing physical blocks

4 years agoAdd process flags to track whether the process and/or the core_item are valid
Nick Downing [Sun, 2 Jun 2019 01:05:21 +0000 (11:05 +1000)]
Add process flags to track whether the process and/or the core_item are valid

4 years agoAdd per-process tracking of amount swapped (formerly was in victim_swap_blocks)
Nick Downing [Sun, 2 Jun 2019 00:33:49 +0000 (10:33 +1000)]
Add per-process tracking of amount swapped (formerly was in victim_swap_blocks)

4 years agoUpdate generated subdirectories to do the process->para and realloc_base tests
Nick Downing [Sun, 2 Jun 2019 01:03:46 +0000 (11:03 +1000)]
Update generated subdirectories to do the process->para and realloc_base tests

4 years agoFix a bug with using local copy of runner_swap_blocks not the global variable
Nick Downing [Sun, 2 Jun 2019 00:19:44 +0000 (10:19 +1000)]
Fix a bug with using local copy of runner_swap_blocks not the global variable

4 years agoImplement process->para so that start of data is independent of block boundary, imple...
Nick Downing [Sat, 1 Jun 2019 11:14:20 +0000 (21:14 +1000)]
Implement process->para so that start of data is independent of block boundary, implement realloc_base to extend start via direction flag for process_realloc()

4 years agoDistinguish between swap reservation and occupation in "new core ..." printouts
Nick Downing [Sat, 1 Jun 2019 10:44:05 +0000 (20:44 +1000)]
Distinguish between swap reservation and occupation in "new core ..." printouts

4 years agoTidy up the actual_old_paras/actual_old_blocks stuff and make the test script include...
Nick Downing [Sat, 1 Jun 2019 05:07:40 +0000 (15:07 +1000)]
Tidy up the actual_old_paras/actual_old_blocks stuff and make the test script include all the information used to calculate success values (for added checking)

4 years agoChange all byte sizes to paras, BLOCK_SIZE to BLOCK_PARAS and so on, make core_block_...
Nick Downing [Sat, 1 Jun 2019 02:05:26 +0000 (12:05 +1000)]
Change all byte sizes to paras, BLOCK_SIZE to BLOCK_PARAS and so on, make core_block_mem/swap_block_mem use one int per simulated para not one uint8_t per byte

4 years agoSimplify hashing function to eliminate wraparound carry and use of long long
Nick Downing [Sat, 1 Jun 2019 00:21:47 +0000 (10:21 +1000)]
Simplify hashing function to eliminate wraparound carry and use of long long

4 years agoFix some defines and conditional compiles that got lost in the ifdef-generation
Nick Downing [Fri, 31 May 2019 15:19:25 +0000 (01:19 +1000)]
Fix some defines and conditional compiles that got lost in the ifdef-generation

4 years agoTurn things around so that swap is written from top down
Nick Downing [Fri, 31 May 2019 15:05:56 +0000 (01:05 +1000)]
Turn things around so that swap is written from top down

4 years agoRemove first/last transfer optimization, it will be done differently
Nick Downing [Fri, 31 May 2019 13:28:28 +0000 (23:28 +1000)]
Remove first/last transfer optimization, it will be done differently

4 years agoMake victim_core_blocks be calculated on the fly, keep only victim_swap_blocks
Nick Downing [Fri, 31 May 2019 13:17:23 +0000 (23:17 +1000)]
Make victim_core_blocks be calculated on the fly, keep only victim_swap_blocks

4 years agoRe-enable all diagnostic printfs
Nick Downing [Fri, 31 May 2019 13:13:10 +0000 (23:13 +1000)]
Re-enable all diagnostic printfs

4 years agoRemove support for INODE_SWAP, make PREALLOCATE_SWAP always, make PREALLOCATE_CORE...
Nick Downing [Wed, 29 May 2019 13:32:00 +0000 (23:32 +1000)]
Remove support for INODE_SWAP, make PREALLOCATE_SWAP always, make PREALLOCATE_CORE when INDIRECT_CORE (have done this automatically, adds diff --ifdef scripts)

4 years agoAdd forgotten file
Nick Downing [Wed, 29 May 2019 13:05:36 +0000 (23:05 +1000)]
Add forgotten file

4 years agoImplement binary format script (for use within kernel, where there's no scanf)
Nick Downing [Sat, 18 May 2019 02:34:56 +0000 (12:34 +1000)]
Implement binary format script (for use within kernel, where there's no scanf)

4 years agoMore printf and unnecessary header removal, improve preprocessed blank lines
Nick Downing [Sat, 18 May 2019 01:23:12 +0000 (11:23 +1000)]
More printf and unnecessary header removal, improve preprocessed blank lines

4 years agoImplement FUZIX build, reduces block sizes, simplifies hash function, fixes rassert...
Nick Downing [Sat, 18 May 2019 00:17:59 +0000 (10:17 +1000)]
Implement FUZIX build, reduces block sizes, simplifies hash function, fixes rassert issues

4 years agoRemove all non-essential printfs (for code size reduction in FUZIX build)
Nick Downing [Sat, 18 May 2019 00:14:01 +0000 (10:14 +1000)]
Remove all non-essential printfs (for code size reduction in FUZIX build)

4 years agoSeparate out block allocation bitmap stuff into a reuseable module block_pool.c
Nick Downing [Thu, 9 May 2019 12:06:06 +0000 (22:06 +1000)]
Separate out block allocation bitmap stuff into a reuseable module block_pool.c

4 years agoRename pool_realloc() to pool_alloc() with a mode argument instead of ad-hoc schemes...
Nick Downing [Sun, 5 May 2019 11:55:47 +0000 (21:55 +1000)]
Rename pool_realloc() to pool_alloc() with a mode argument instead of ad-hoc schemes like sending an offset of INT_MIN or not filling in the move_up() routine

4 years agoNew combined routine that does all of pool_alloc(), pool_realloc(), pool_realloc_base...
Nick Downing [Sun, 5 May 2019 03:31:21 +0000 (13:31 +1000)]
New combined routine that does all of pool_alloc(), pool_realloc(), pool_realloc_base() and does the best it can with whatever move()/move_up() routines found

5 years agoCombine non-moveable with moveable pool, define both head->move and head->move_up...
Nick Downing [Mon, 22 Apr 2019 07:22:10 +0000 (17:22 +1000)]
Combine non-moveable with moveable pool, define both head->move and head->move_up to enable moveability, or just head->move for ordinary malloc-like behaviour

5 years agoBack out change from commit f4338d0 to process_avail, as process_avail was already...
Nick Downing [Mon, 22 Apr 2019 06:23:04 +0000 (16:23 +1000)]
Back out change from commit f4338d0 to process_avail, as process_avail was already defined to include the indirect blocks so no need to estimate their removal

5 years agoMove swap space tests into do_swap_out(), re-evaluate for each victim to be less...
Nick Downing [Mon, 22 Apr 2019 05:26:09 +0000 (15:26 +1000)]
Move swap space tests into do_swap_out(), re-evaluate for each victim to be less conservative in the inode swap case (allow only 2 blocks for partial indirect)

5 years agoDo proper computations about disk free space including possible direct and indirect...
Nick Downing [Sun, 21 Apr 2019 11:38:36 +0000 (21:38 +1000)]
Do proper computations about disk free space including possible direct and indirect blocks (should revisit to be less conservative in transfer sizes by estimating each victim separately so we don't need to allow for so many partial direct/indirect blocks upfront), get NDEBUG working again (doesn't fill core with 0xaa)

5 years agoMore strictly declare variables at start of function, for ack
Nick Downing [Sun, 21 Apr 2019 05:38:47 +0000 (15:38 +1000)]
More strictly declare variables at start of function, for ack

5 years agoFix inode leak caused by the f_trunc() modifications
Nick Downing [Thu, 11 Apr 2019 13:26:26 +0000 (23:26 +1000)]
Fix inode leak caused by the f_trunc() modifications

5 years agoOptimize out the classic or moveable allocator when not needed
Nick Downing [Thu, 11 Apr 2019 12:41:26 +0000 (22:41 +1000)]
Optimize out the classic or moveable allocator when not needed

5 years agoFix several more minor bugs, add gen.sh which pre-runs the C preprocessor to generate...
Nick Downing [Thu, 11 Apr 2019 12:00:05 +0000 (22:00 +1000)]
Fix several more minor bugs, add gen.sh which pre-runs the C preprocessor to generate 6 specialized versions of the code

5 years agoFix INDIRECT_CORE with INODE_SWAP combination
Nick Downing [Thu, 11 Apr 2019 11:12:55 +0000 (21:12 +1000)]
Fix INDIRECT_CORE with INODE_SWAP combination

5 years agoCommit a forgotten file
Nick Downing [Thu, 11 Apr 2019 10:25:57 +0000 (20:25 +1000)]
Commit a forgotten file

5 years agoFirst cut at inode swapping, works, may have an inode leak somewhere
Nick Downing [Tue, 9 Apr 2019 14:10:56 +0000 (00:10 +1000)]
First cut at inode swapping, works, may have an inode leak somewhere

5 years agoExpand out the swap_read()/swap_write() functions inline, since they were only called...
Nick Downing [Tue, 9 Apr 2019 10:13:52 +0000 (20:13 +1000)]
Expand out the swap_read()/swap_write() functions inline, since they were only called once, and they were supposed to be abstract but now the abstract part is done by core_to_swap_copy()/swap_to_core_copy() and the rest is well defined -- makes core.h/swap.h and core.c/swap.c identical again except for core<->swap

5 years agoChange order of adjusting process_core_blocks/process_swap_blocks/victim_core_blocks...
Nick Downing [Sun, 7 Apr 2019 06:12:47 +0000 (16:12 +1000)]
Change order of adjusting process_core_blocks/process_swap_blocks/victim_core_blocks/victim_swap_blocks to reduce computation

5 years agoMove PREALLOCATE_CORE/PREALLOCATE_SWAP defines into the respective header files and...
Nick Downing [Sun, 7 Apr 2019 05:27:35 +0000 (15:27 +1000)]
Move PREALLOCATE_CORE/PREALLOCATE_SWAP defines into the respective header files and define victim_core_size/victim_swap_size there, remove old victim_xxx_item

5 years agoMore optimal handling of incomplete last block in swap_read()/swap_write()
Nick Downing [Sat, 6 Apr 2019 03:31:15 +0000 (14:31 +1100)]
More optimal handling of incomplete last block in swap_read()/swap_write()

5 years agoFix a bug in undo successful process realloc, fix a bug in number of blocks to transf...
Nick Downing [Sat, 6 Apr 2019 03:17:07 +0000 (14:17 +1100)]
Fix a bug in undo successful process realloc, fix a bug in number of blocks to transfer for swap_read() and swap_write(), fix minor inconsistencies

5 years agoMove core_block_mem and swap_block_mem into pool_test_run.c and make core/swap memory...
Nick Downing [Fri, 5 Apr 2019 23:11:14 +0000 (10:11 +1100)]
Move core_block_mem and swap_block_mem into pool_test_run.c and make core/swap memory accessor functions abstract, make core/swap move do incomplete last block

5 years agoGet rid of the DEDICATED_xxx() macros in favour of more optimal inline code
Nick Downing [Sat, 6 Apr 2019 02:47:04 +0000 (13:47 +1100)]
Get rid of the DEDICATED_xxx() macros in favour of more optimal inline code

5 years agoGet rid of the dedicated and per-process core/swap item, just use per-process
Nick Downing [Fri, 5 Apr 2019 11:34:32 +0000 (22:34 +1100)]
Get rid of the dedicated and per-process core/swap item, just use per-process

5 years agoImplement partial transfer to/from swap for incomplete last block pool_swap
Nick Downing [Thu, 4 Apr 2019 11:20:43 +0000 (22:20 +1100)]
Implement partial transfer to/from swap for incomplete last block

5 years agoMake swap reading/writing take bytes not blocks, allowing incomplete last block
Nick Downing [Thu, 4 Apr 2019 10:20:03 +0000 (21:20 +1100)]
Make swap reading/writing take bytes not blocks, allowing incomplete last block

5 years agoMake only the active (bytewise not blockwise) portion of process be hashed
Nick Downing [Thu, 4 Apr 2019 10:01:31 +0000 (21:01 +1100)]
Make only the active (bytewise not blockwise) portion of process be hashed

5 years agoMake process hash init and verify be bytewise rather than blockwise
Nick Downing [Thu, 4 Apr 2019 09:49:17 +0000 (20:49 +1100)]
Make process hash init and verify be bytewise rather than blockwise

5 years agoSimplify the calling convention of the hash init and verify routines
Nick Downing [Thu, 4 Apr 2019 09:21:18 +0000 (20:21 +1100)]
Simplify the calling convention of the hash init and verify routines

5 years agoMove the hash generation and verification stuff into process_test_run.c
Nick Downing [Thu, 4 Apr 2019 09:12:30 +0000 (20:12 +1100)]
Move the hash generation and verification stuff into process_test_run.c

5 years agoChange process.blocks to process.size, do rounding and shifting at each access
Nick Downing [Thu, 4 Apr 2019 09:07:11 +0000 (20:07 +1100)]
Change process.blocks to process.size, do rounding and shifting at each access

5 years agoChange test script to refer to bytes, although everything still done in blocks
Nick Downing [Thu, 4 Apr 2019 08:05:40 +0000 (19:05 +1100)]
Change test script to refer to bytes, although everything still done in blocks

5 years agoIn process related stuff, change size to blocks and SIZE to BLOCKS
Nick Downing [Thu, 4 Apr 2019 07:46:28 +0000 (18:46 +1100)]
In process related stuff, change size to blocks and SIZE to BLOCKS

5 years agoImplement further macros DEDICATED_CORE_BASE() and DEDICATED_SWAP_LIMIT() which know...
Nick Downing [Sun, 31 Mar 2019 10:17:28 +0000 (21:17 +1100)]
Implement further macros DEDICATED_CORE_BASE() and DEDICATED_SWAP_LIMIT() which know whether the underlying items get updated during swap or whether they are preallocated at process creation time, and take a correction factor to apply in the latter case (by macro, so the correction is not evaluated in the former case)

5 years agoImplement higher level macros to access process->core_item vs process->pool_item...
Nick Downing [Sun, 31 Mar 2019 07:43:24 +0000 (18:43 +1100)]
Implement higher level macros to access process->core_item vs process->pool_item, victim->core_item vs victim_core_item and so on (depends on configuration)

5 years agoRemove some bogus assertions that don't work in preallocated modes, tidy up
Nick Downing [Sun, 31 Mar 2019 07:45:24 +0000 (18:45 +1100)]
Remove some bogus assertions that don't work in preallocated modes, tidy up

5 years agoChange direction of swap in/out to forward, so that core is read/written in deque...
Nick Downing [Sun, 31 Mar 2019 02:40:20 +0000 (13:40 +1100)]
Change direction of swap in/out to forward, so that core is read/written in deque fashion (when swapping out, pop off the base, when swapping in, push onto the base) whereas swap is read/written in file fashion (when swapping out, append to the limit, when swapping in, truncate the limit), allows a swap-to-inode mode

5 years agoAdd pool_realloc_base() and pool_realloc_base_moveable() to allow a region to be...
Nick Downing [Sat, 30 Mar 2019 12:39:13 +0000 (23:39 +1100)]
Add pool_realloc_base() and pool_realloc_base_moveable() to allow a region to be used like a deque, new space can be pushed onto and contents popped off start

5 years agoAdd inode test script
Nick Downing [Thu, 28 Mar 2019 12:30:27 +0000 (23:30 +1100)]
Add inode test script

5 years agoAdd UCP from FUZIX, with modifications to isolate FS stuff into new fuzix_fs.c
Nick Downing [Sun, 24 Mar 2019 02:38:30 +0000 (13:38 +1100)]
Add UCP from FUZIX, with modifications to isolate FS stuff into new fuzix_fs.c

5 years agoImplement simulated BLOCK_SIZE, hash create and check simulated block contents
Nick Downing [Sat, 23 Mar 2019 22:55:43 +0000 (09:55 +1100)]
Implement simulated BLOCK_SIZE, hash create and check simulated block contents

5 years agoMake n_blocks the primary size and table_size only given if indirect (was the other...
Nick Downing [Sat, 23 Mar 2019 21:46:23 +0000 (08:46 +1100)]
Make n_blocks the primary size and table_size only given if indirect (was the other way around, making block stuff use either table_size or n_blocks), fix bugs

5 years agoSubroutinize the hashing initialization and verification, to avoid duplication
Nick Downing [Sat, 23 Mar 2019 06:22:24 +0000 (17:22 +1100)]
Subroutinize the hashing initialization and verification, to avoid duplication

5 years agoPrint message like 'alloc NN NN true|false' and then perform the operation and then...
Nick Downing [Sat, 23 Mar 2019 05:50:59 +0000 (16:50 +1100)]
Print message like 'alloc NN NN true|false' and then perform the operation and then '... ok', so that we can see clearly what messages come from what operation

5 years agoRemove the reservation of spare space from pool object, core and swap modules
Nick Downing [Sat, 23 Mar 2019 04:44:49 +0000 (15:44 +1100)]
Remove the reservation of spare space from pool object, core and swap modules

5 years agoImplement INDIRECT_CORE, fix calculations so that PREALLOCATE_CORE make sense
Nick Downing [Tue, 19 Mar 2019 13:13:23 +0000 (00:13 +1100)]
Implement INDIRECT_CORE, fix calculations so that PREALLOCATE_CORE make sense

5 years agoFor direct swap, store data in swap_block_mem not swap_table_mem, also for core
Nick Downing [Tue, 19 Mar 2019 10:36:45 +0000 (21:36 +1100)]
For direct swap, store data in swap_block_mem not swap_table_mem, also for core

5 years agoAdd INDIRECT_SWAP option
Nick Downing [Tue, 19 Mar 2019 10:11:51 +0000 (21:11 +1100)]
Add INDIRECT_SWAP option

5 years agoInsert table_ in most core.c / swap.c functions e.g. core_alloc() becomes core_table_...
Nick Downing [Mon, 18 Mar 2019 10:24:39 +0000 (21:24 +1100)]
Insert table_ in most core.c / swap.c functions e.g. core_alloc() becomes core_table_alloc(), because there will soon be an allocator for random block storage

5 years agoImplement MOVEABLE_CORE and MOVEABLE_SWAP compile time options
Nick Downing [Sun, 17 Mar 2019 03:23:55 +0000 (14:23 +1100)]
Implement MOVEABLE_CORE and MOVEABLE_SWAP compile time options

5 years agoFix a bug of requiring a certain amount of free swap, when swap is preallocated
Nick Downing [Sun, 17 Mar 2019 03:16:54 +0000 (14:16 +1100)]
Fix a bug of requiring a certain amount of free swap, when swap is preallocated

5 years agoFix a bug of victim_core_size being used uninitialized without PREALLOCATE_CORE
Nick Downing [Sun, 17 Mar 2019 03:00:27 +0000 (14:00 +1100)]
Fix a bug of victim_core_size being used uninitialized without PREALLOCATE_CORE

5 years agoImplement PREALLOCATE_CORE and PREALLOCATE_SWAP compile time options
Nick Downing [Sun, 17 Mar 2019 02:24:46 +0000 (13:24 +1100)]
Implement PREALLOCATE_CORE and PREALLOCATE_SWAP compile time options

5 years agoImprove use of alloc()/realloc()/free() to remove allocs and reallocs of size 0
Nick Downing [Sat, 16 Mar 2019 22:27:26 +0000 (09:27 +1100)]
Improve use of alloc()/realloc()/free() to remove allocs and reallocs of size 0

5 years agoTidy up debugging code
Nick Downing [Sat, 16 Mar 2019 14:03:15 +0000 (01:03 +1100)]
Tidy up debugging code

5 years agoReplace core_item and swap_item in the process structure with just pool_item
Nick Downing [Sat, 16 Mar 2019 13:58:21 +0000 (00:58 +1100)]
Replace core_item and swap_item in the process structure with just pool_item

5 years agoKeep process and victim pool items in dedicated storage during swapping (should gener...
Nick Downing [Sat, 16 Mar 2019 13:47:56 +0000 (00:47 +1100)]
Keep process and victim pool items in dedicated storage during swapping (should generate smaller code, also ensures a process has only one pool item at a time)