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
Reduce the amount of memory allocated by KCM and avoid zeroing it when not necessary #7014
Labels
Comments
aplopez
added a commit
to aplopez/sssd
that referenced
this issue
Nov 3, 2023
sss_iobuf_init_empty() and related functions zero the allocated memory even though it is not needed. Most of the time, all the fields in the structures will be set to non-zero values. In these cases zeroing the is useless and we stop doing it. Only in one case two pointers were being used with those NULL values, so they are now being manually set to NULL. Resolves: SSSD#7014
aplopez
added a commit
to aplopez/sssd
that referenced
this issue
Nov 3, 2023
Some packages are being allocated to their maximum size, even though all that memory is not required. When the amount of memory needed is not know, We reduce the amount of memory allocated to the initial size defined by the KCM_PACKET_INITIAL_SIZE macro. The existing KCM_REPLY_MAX was replaced by KCM_PACKET_MAX_SIZE. Resolves: SSSD#7014
aplopez
added a commit
to aplopez/sssd
that referenced
this issue
Nov 3, 2023
sss_iobuf_init_empty() and related functions zero the allocated memory even though it is not needed. Most of the time, all the fields in the structures will be set to non-zero values. In these cases zeroing the is useless and we stop doing it. Only in two case, some pointers were being left unmodified, so they are now being manually set to NULL. Resolves: SSSD#7014
aplopez
added a commit
to aplopez/sssd
that referenced
this issue
Nov 3, 2023
Some packages are being allocated to their maximum size, even though all that memory is not required. When the amount of memory needed is not know, We reduce the amount of memory allocated to the initial size defined by the KCM_PACKET_INITIAL_SIZE macro. The existing KCM_REPLY_MAX was replaced by KCM_PACKET_MAX_SIZE. Resolves: SSSD#7014
aplopez
added a commit
to aplopez/sssd
that referenced
this issue
Nov 7, 2023
sss_iobuf_init_empty() and related functions zero the allocated memory even though it is not needed. Most of the time, all the fields in the structures will be set to non-zero values. In these cases zeroing the is useless and we stop doing it. Only in two caseis, some pointers were being left unmodified, so they are now being manually set to NULL. Resolves: SSSD#7014
aplopez
added a commit
to aplopez/sssd
that referenced
this issue
Nov 7, 2023
Some packages are being allocated to their maximum size, even though all that memory is not required. When the amount of memory needed is not know, We reduce the amount of memory allocated to the initial size defined by the KCM_PACKET_INITIAL_SIZE macro. The existing KCM_REPLY_MAX was replaced by KCM_PACKET_MAX_SIZE. Resolves: SSSD#7014
aplopez
added a commit
to aplopez/sssd
that referenced
this issue
Nov 13, 2023
sss_iobuf_init_empty() and related functions zero the allocated memory even though it is not needed. Most of the time, all the fields in the structures will be set to non-zero values. In these cases zeroing the is useless and we stop doing it. Only in two cases, some pointers were being left unmodified, so they are now being manually set to NULL. Resolves: SSSD#7014
aplopez
added a commit
to aplopez/sssd
that referenced
this issue
Nov 13, 2023
Some packages are being allocated to their maximum size, even though all that memory is not required. When the amount of memory needed is not know, We reduce the amount of memory allocated to the initial size defined by the KCM_PACKET_INITIAL_SIZE macro. The existing KCM_REPLY_MAX was replaced by KCM_PACKET_MAX_SIZE. Resolves: SSSD#7014
aplopez
added a commit
to aplopez/sssd
that referenced
this issue
Nov 13, 2023
sss_iobuf_init_empty() and related functions zero the allocated memory even though it is not needed. Most of the time, all the fields in the structures will be set to non-zero values. In these cases zeroing the is useless and we stop doing it. Only in two cases, some pointers were being left unmodified, so they are now being manually set to NULL. Resolves: SSSD#7014
aplopez
added a commit
to aplopez/sssd
that referenced
this issue
Nov 13, 2023
Some packages are being allocated to their maximum size, even though all that memory is not required. When the amount of memory needed is not know, We reduce the amount of memory allocated to the initial size defined by the KCM_PACKET_INITIAL_SIZE macro. The existing KCM_REPLY_MAX was replaced by KCM_PACKET_MAX_SIZE. Resolves: SSSD#7014
aplopez
added a commit
to aplopez/sssd
that referenced
this issue
Nov 13, 2023
sss_iobuf_init_empty() and related functions zero the allocated memory even though it is not needed. Most of the time, all the fields in the structures will be set to non-zero values. In these cases zeroing the is useless and we stop doing it. Only in two cases, some pointers were being left unmodified, so they are now being manually set to NULL. Resolves: SSSD#7014
aplopez
added a commit
to aplopez/sssd
that referenced
this issue
Nov 13, 2023
Some packages are being allocated to their maximum size, even though all that memory is not required. When the amount of memory needed is not know, We reduce the amount of memory allocated to the initial size defined by the KCM_PACKET_INITIAL_SIZE macro. The existing KCM_REPLY_MAX was replaced by KCM_PACKET_MAX_SIZE. Resolves: SSSD#7014
pbrezina
pushed a commit
that referenced
this issue
Nov 28, 2023
Some packages are being allocated to their maximum size, even though all that memory is not required. When the amount of memory needed is not know, We reduce the amount of memory allocated to the initial size defined by the KCM_PACKET_INITIAL_SIZE macro. The existing KCM_REPLY_MAX was replaced by KCM_PACKET_MAX_SIZE. Resolves: #7014 Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Tomáš Halman <thalman@redhat.com>
pbrezina
pushed a commit
that referenced
this issue
Nov 28, 2023
sss_iobuf_init_empty() and related functions zero the allocated memory even though it is not needed. Most of the time, all the fields in the structures will be set to non-zero values. In these cases zeroing the is useless and we stop doing it. Only in two cases, some pointers were being left unmodified, so they are now being manually set to NULL. Resolves: #7014 Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Tomáš Halman <thalman@redhat.com> (cherry picked from commit edb63cd)
pbrezina
pushed a commit
that referenced
this issue
Nov 28, 2023
Some packages are being allocated to their maximum size, even though all that memory is not required. When the amount of memory needed is not know, We reduce the amount of memory allocated to the initial size defined by the KCM_PACKET_INITIAL_SIZE macro. The existing KCM_REPLY_MAX was replaced by KCM_PACKET_MAX_SIZE. Resolves: #7014 Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Tomáš Halman <thalman@redhat.com> (cherry picked from commit fe6c35a)
Pushed PR: #7022
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Calls to
sss_iobuf_init_empty()
in KCM provide the initial size and the maximum capacity as parameters. In some cases the exact size of the required structure is passed as the initial size, but in other cases a generic value based on KCM_REPLY_MAX (currently 10 MiB) is provided.The text was updated successfully, but these errors were encountered: