aboutsummaryrefslogtreecommitdiffstats
path: root/arena.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2001-10-23 03:08:42 +0000
committerH. Peter Anvin <hpa@zytor.com>2001-10-23 03:08:42 +0000
commit9e0923f6291e0a6f98a91bf5cafcb9ef0ed0405f (patch)
tree7d03a25c159bf948a0b1b7694362cea2dc5d7120 /arena.c
parente2c07775f2cda3c25a8e2ed47fbf1f0de4d548c1 (diff)
downloadlpsm-9e0923f6291e0a6f98a91bf5cafcb9ef0ed0405f.tar.gz
lpsm-9e0923f6291e0a6f98a91bf5cafcb9ef0ed0405f.tar.xz
lpsm-9e0923f6291e0a6f98a91bf5cafcb9ef0ed0405f.zip
If the base address doesn't match, try to map at the required base
address instead.
Diffstat (limited to 'arena.c')
-rw-r--r--arena.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arena.c b/arena.c
index f28cb45..0de97d9 100644
--- a/arena.c
+++ b/arena.c
@@ -285,15 +285,15 @@ static int lpsm_recover_log(void)
* playback (crash recovery) if the log file exists
* and is nonempty.
*/
-void *lpsm_arena_init(const char *main_file, const char *log_file, size_t *arena_len)
+void *lpsm_arena_init(const char *main_file, const char *log_file,
+ size_t *arena_len, void *arena_ptr)
{
- void *arena_ptr;
struct sigaction sigact;
struct flock lock;
off_t file_len, len = arena_len ? *arena_len : 0;
size_t file_pages, len_pages;
- arena_ptr = ARENA_ADDRESS;
+ arena_ptr = arena_ptr ? arena_ptr : ARENA_ADDRESS;
PM = malloc(sizeof(struct lpsm_arena));
if ( !PM )