From 8d3cd6f2ec22dc3079a9ce5f632d09a0526954b9 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Sun, 24 May 2026 01:10:23 +0200 Subject: server: report workspace memory --- pplx_embed.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pplx_embed.h') diff --git a/pplx_embed.h b/pplx_embed.h index 1bac5f6..23ca2a9 100644 --- a/pplx_embed.h +++ b/pplx_embed.h @@ -74,6 +74,14 @@ void pplx_workspace_free(pplx_workspace_t *ws); /* Config accessor for opaque model ownership. */ const pplx_config_t *pplx_model_config(const pplx_model_t *model); +/* + * Current mutable workspace memory owned by this workspace, in bytes. + * + * This includes the workspace struct, scratch buffers, and RoPE cache capacity. + * It does not include immutable mmap'd model weights. + */ +size_t pplx_workspace_nbytes(const pplx_workspace_t *ws); + /* * Compute embedding for a token sequence. * -- cgit v1.3.1