mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-06 02:48:57 +01:00
fix double-free with --no-mmap
This commit is contained in:
parent
4e94af3060
commit
1102ff56db
@ -650,8 +650,6 @@ struct llama_model_loader {
|
|||||||
// hint the OS that we don't need the data anymore
|
// hint the OS that we don't need the data anymore
|
||||||
// TODO: this may be a bad idea with devices that use the system memory (Metal?)
|
// TODO: this may be a bad idea with devices that use the system memory (Metal?)
|
||||||
mapping->discard(lt.data, lt.size);
|
mapping->discard(lt.data, lt.size);
|
||||||
} else {
|
|
||||||
free(lt.data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user