mirror of
https://github.com/samba-team/samba.git
synced 2025-12-13 16:23:50 +03:00
r23528: Two changes to make the valgrind massif (heap profiler) output readable:
Remove the allocated inbuf/output. In async I/O we copy the buffers explicitly now, so NewInBuffer is called exactly once. This does not reduce memory footprint, but removes one of the larger chunks that clobber the rest of the massif output In getgroups_unix_user on Linux 2.6 we allocated 64k groups x 4 bytes per group x 2 (once in the routine itself and once in libc) = 512k just to throw it away directly again. This reduces it do a more typical limit of 32 groups per user. We certainly cope with overflow fine if 32 is not enough. Not 100% sure about this one, a DEVELOPER only thing?
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
9dcbef9615
commit
009af09099
@@ -154,7 +154,7 @@ BOOL getgroups_unix_user(TALLOC_CTX *mem_ctx, const char *user,
|
||||
gid_t *groups;
|
||||
int i;
|
||||
|
||||
max_grp = groups_max();
|
||||
max_grp = MIN(32, groups_max());
|
||||
temp_groups = SMB_MALLOC_ARRAY(gid_t, max_grp);
|
||||
if (! temp_groups) {
|
||||
return False;
|
||||
|
||||
Reference in New Issue
Block a user