-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add zfree_with_size to optimize sdsfree since we can get zmalloc_size from the header #453
Commits on Jun 3, 2024
-
zfree updates memory statistics. It gets the size of the buffer from jemalloc by calling zmalloc_size. This operation is costly. We can avoid it if we know the buffer size. For example, we can calculate size of sds from the data we have in its header. This commit introduces zfree_with_size function that accepts both pointer to a buffer, and its size. zfree is refactored to call zfree_with_size. sdsfree uses the new interface for all but SDS_TYPE_5. Signed-off-by: Vadym Khoptynets <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0a2d984 - Browse repository at this point
Copy the full SHA 0a2d984View commit details -
Fix sdsAllocSize for SDS_TYPE_5
sdsalloc returns sds's length for SDS_TYPE_5. It's not correct for SDS_TYPE_5. This patch makes sdsAllocSize call zmalloc_size for SDS_TYPE_5. sdsalloc is a lower level function that continues to return length for SDS_TYPE_5. Signed-off-by: Vadym Khoptynets <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2310767 - Browse repository at this point
Copy the full SHA 2310767View commit details -
Do not include zmalloc into sds.c
Instead of zmalloc_size use s_malloc_size. Signed-off-by: Vadym Khoptynets <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 37ad930 - Browse repository at this point
Copy the full SHA 37ad930View commit details
Commits on Jun 11, 2024
-
Apply suggestions from code review
Change the doc string for `zfree_with_size` Signed-off-by: Vadym Khoptynets <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 21acd10 - Browse repository at this point
Copy the full SHA 21acd10View commit details -
Update zfree_with_size() docstring
Signed-off-by: Vadym Khoptynets <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0c2048d - Browse repository at this point
Copy the full SHA 0c2048dView commit details -
Revert Makefile changes pushed by mistake
Signed-off-by: Vadym Khoptynets <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 72e6b28 - Browse repository at this point
Copy the full SHA 72e6b28View commit details
Commits on Jun 13, 2024
-
Make zfree_with_size work correctly on systems without malloc_size
Signed-off-by: Vadym Khoptynets <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2f96c40 - Browse repository at this point
Copy the full SHA 2f96c40View commit details -
Update zfree_internal docstring and add assert
Signed-off-by: Vadym Khoptynets <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 19f8f36 - Browse repository at this point
Copy the full SHA 19f8f36View commit details -
Include serverassert.h in zmalloc.c
Signed-off-by: Vadym Khoptynets <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 195a4a9 - Browse repository at this point
Copy the full SHA 195a4a9View commit details
Commits on Jun 18, 2024
-
Apply madolson's suggestion on zfree_internal
Signed-off-by: Vadym Khoptynets <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 017941d - Browse repository at this point
Copy the full SHA 017941dView commit details
Commits on Jun 19, 2024
-
Signed-off-by: Madelyn Olson <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1a3a6d6 - Browse repository at this point
Copy the full SHA 1a3a6d6View commit details