On Mon, Oct 05 2015, Bart Van Assche wrote:
> On 10/05/15 02:26, Rasmus Villemoes wrote:
>> struct error_info {
>> unsigned short code12; /* 0x0302 looks better than 0x03,0x02 */
>> -const char * text;
>> +unsigned short size;
>> };
>
> Had you
On 64 bit, struct error_info has 6 bytes of padding, which amounts to
over 4k of wasted space in the additional[] array. We could easily get
rid of that by instead using separate arrays for the codes and the
pointers. However, we can do even better than that and save an
additional 6 bytes per
On 10/05/15 02:26, Rasmus Villemoes wrote:
struct error_info {
unsigned short code12; /* 0x0302 looks better than 0x03,0x02 */
- const char * text;
+ unsigned short size;
};
Had you considered to use the type uint16_t instead of unsigned short ?
Bart.
--
To
3 matches
Mail list logo