diff options
author | Justine Tunney <jtunney@gmail.com> | 2023-03-30 01:53:36 -0700 |
---|---|---|
committer | Justine Tunney <jtunney@gmail.com> | 2023-03-30 12:28:25 -0700 |
commit | 6f23ba5ee235cbcb1eedd63b98422dd8d4392a78 (patch) | |
tree | f4cd59b1850674cc79ce2a0d48dab6a5220255c4 /llama.cpp | |
parent | 78ca9838ee36660a776e97e3391b6fb5dcaacf7f (diff) |
Ensure --mlock works properly with mmap() support
Diffstat (limited to 'llama.cpp')
-rw-r--r-- | llama.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1595,7 +1595,10 @@ struct llama_context * llama_init_from_file( if (params.use_mlock) { char *err; - if (!ggml_mlock(ctx->model.ctx, &err)) { + if (!ggml_mlock(ctx->model.ctx, + ctx->model.mm_addr, + ctx->model.mm_length, + &err)) { fprintf(stderr, "%s\n", err); free(err); llama_free(ctx); |