alignment & size
This commit is contained in:
parent
2bd046593c
commit
91cf8f1c88
@ -13,16 +13,18 @@
|
|||||||
#include "procps.h"
|
#include "procps.h"
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
|
||||||
#define HASHSIZE 16 /* power of 2 */
|
// might as well fill cache lines... else we waste memory anyway
|
||||||
|
|
||||||
|
#define HASHSIZE 32 /* power of 2 */
|
||||||
#define HASH(x) ((x) & (HASHSIZE - 1))
|
#define HASH(x) ((x) & (HASHSIZE - 1))
|
||||||
|
|
||||||
#define NAMESIZE 16
|
#define NAMESIZE 20
|
||||||
#define NAMELENGTH "15"
|
#define NAMELENGTH "19"
|
||||||
|
|
||||||
static struct pwbuf {
|
static struct pwbuf {
|
||||||
|
struct pwbuf *next;
|
||||||
uid_t uid;
|
uid_t uid;
|
||||||
char name[NAMESIZE];
|
char name[NAMESIZE];
|
||||||
struct pwbuf *next;
|
|
||||||
} *pwhash[HASHSIZE];
|
} *pwhash[HASHSIZE];
|
||||||
|
|
||||||
char *user_from_uid(uid_t uid)
|
char *user_from_uid(uid_t uid)
|
||||||
@ -47,9 +49,9 @@ char *user_from_uid(uid_t uid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct grpbuf {
|
static struct grpbuf {
|
||||||
|
struct grpbuf *next;
|
||||||
gid_t gid;
|
gid_t gid;
|
||||||
char name[NAMESIZE];
|
char name[NAMESIZE];
|
||||||
struct grpbuf *next;
|
|
||||||
} *grphash[HASHSIZE];
|
} *grphash[HASHSIZE];
|
||||||
|
|
||||||
char *group_from_gid(gid_t gid)
|
char *group_from_gid(gid_t gid)
|
||||||
|
Loading…
Reference in New Issue
Block a user