From df7da9bb411d67e71c210151a8716d2c6f04045b Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Tue, 30 May 2023 17:00:00 -0700 Subject: [PATCH] libsysprof-profile: remove frame overhead from max data length Just so that we can potentially fit multiple of these per buffering in the capture writer. --- src/libsysprof-profile/sysprof-recording.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsysprof-profile/sysprof-recording.c b/src/libsysprof-profile/sysprof-recording.c index 53a245e3..d455fc34 100644 --- a/src/libsysprof-profile/sysprof-recording.c +++ b/src/libsysprof-profile/sysprof-recording.c @@ -414,7 +414,7 @@ sysprof_recording_add_file_fiber (gpointer user_data) while (len > 0) { - gsize to_write = MIN (len, 4096*8); + gsize to_write = MIN (len, ((4096*8)-sizeof (SysprofCaptureFileChunk))); if (!sysprof_capture_writer_add_file (add_file->writer, SYSPROF_CAPTURE_CURRENT_TIME,