[DO NOT MERGE] Allocating fixed size for upload chunk content - #554
Draft
Gautham-coder wants to merge 1 commit into
Draft
[DO NOT MERGE] Allocating fixed size for upload chunk content#554Gautham-coder wants to merge 1 commit into
Gautham-coder wants to merge 1 commit into
Conversation
Signed-off-by: Gautham Kuppuswamy <gkuppuswamy@rocketsoftware.com>
Gautham-coder
marked this pull request as draft
September 10, 2025 14:48
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issue
While #540 did resolve the memory leak for 64bit, the PR had this note
The current behavior is such that we don't see increase the memory till the chunk size is equal to or less than the one used initially. That is, it is advisable to use the same chunk size for all the chunks.Proposed changes
This PR will be used to discuss the possibility of using a fixed size buffer irrespective of the content length, with this in the increase in memory is seen only initially. Varying content size causes no further increase. The Fixed memory size is set to 6MB for testing
This PR addresses Issue: zowe/zss#777
Type of change
Please delete options that are not relevant.
PR Checklist
Please delete options that are not relevant.
Testing
Upload chunks less than 6MB
Further comments
Needs discussion with the squad.
There are other places that process this chunk and allocate memory for ex
zowe-common-c/c/httpfileservice.c
Line 897 in 8a8a151
Start up:

Without fix the PRIVATE-64 value can be seen increasing to 1GB for large files.
With fix, after upload:
