Re: [dev] [sbase][patch] find: change execv to execvp

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Sat, 21 Feb 2015 13:44:28 +0000

On Sat, Feb 21, 2015 at 02:05:23PM +0100, FRIGN wrote:
> OLD
> char *name; /* 4 bytes */ /* 8 bytes */
> int type; /* 4 bytes */ /* 4 bytes */
> int prec; /* 4 bytes */ /* 4 bytes */
> int nargs; /* 4 bytes */ /* 4 bytes */
> int lassoc; /* 4 bytes */ /* 4 bytes */
> -----------------------------------------
> 24 bytes 28 bytes
>
> NEW
> char *name; /* 4 bytes */ /* 8 bytes */
> char type; /* 1 byte */ /* 1 byte */
> char prec; /* 1 byte */ /* 1 byte */
> char nargs; /* 1 byte */ /* 1 byte */
> char lassoc; /* 1 byte */ /* 1 byte */
> -----------------------------------------
> 8 bytes 12 bytes

BTW, you also have to take into account trailing padding.

Your calculation for 4-byte pointers is correct but for 8-byte pointers
the total size will be 16 bytes I think. Still it saves a lot for a large
number of these objects.
Received on Sat Feb 21 2015 - 14:44:28 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 21 2015 - 14:48:13 CET