We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70269ca commit 2bdc096Copy full SHA for 2bdc096
ggml.c
@@ -4411,7 +4411,7 @@ void ggml_free(struct ggml_context * ctx) {
4411
}
4412
4413
size_t ggml_used_mem(const struct ggml_context * ctx) {
4414
- return ctx->objects_end->offs + ctx->objects_end->size;
+ return ctx->objects_end == NULL ? 0 : ctx->objects_end->offs + ctx->objects_end->size;
4415
4416
4417
size_t ggml_set_scratch(struct ggml_context * ctx, struct ggml_scratch scratch) {
0 commit comments