Unify process_alloc() and process_realloc() with PROCESS_ALLOC_MODE_REALLOC bit
[moveable_pool.git] / swap.h
1 #ifndef _SWAP_H
2 #define _SWAP_H 1
3
4 #define INDIRECT_SWAP 1
5
6 #include <stdint.h>
7 #ifdef INDIRECT_SWAP
8 #include "block_pool.h"
9 #endif /* INDIRECT_SWAP */
10 #include "pool.h"
11
12 extern struct pool_head swap_table;
13 #ifdef INDIRECT_SWAP
14 extern int *swap_table_mem;
15 extern struct block_pool swap_block_pool;
16 #endif /* INDIRECT_SWAP */
17
18 #ifndef INDIRECT_SWAP
19 void swap_init(int n_table);
20
21 // abstract
22 void swap_copy(int src_base, int dest_base, int paras);
23 void swap_copy_up(int src_limit, int dest_limit, int paras);
24 #else /* INDIRECT_SWAP */
25 void swap_init(int n_table, int n_blocks);
26 #endif /* INDIRECT_SWAP */
27
28 #endif