Reduce memory churn

Issue #84 resolved
Tygre repo owner created an issue

Right now, new buffers are allocated at almost any occasions! From buffers holding modules data to buffers holding command strings or cached lists... These many buffers create a lot of "holes" in memory... Reuse is in order!

Comments (4)

  1. Tygre reporter

    In particular, rethink and make consistency the various sizes of the various buffers and how they grow. For example, in http.c and https.c, there's the TEMPORARY_BUFFER_LENGTH and a growth factor of 3 x TEMPORARY_BUFFER_LENGTH while in ftp.c, the same TEMPORARY_BUFFER_LENGTH is USHRT_MAX / 4, etc.

  2. Tygre reporter

    Introduced a new header file, constants.h, to store common constants and used them systematically across all C files.

  3. Log in to comment