@nikhil:So what u mean is that if i have:
struct{
int a;
char b[5];
};
the size of this struct's node will be 12 not 9.., to make it a multiple of 4??
On 7/26/11, Nikhil Gupta <[email protected]> wrote:
> Padding is not a topic of self referential structure.
>
> Padding means that extra spaces of memory are used by the compiler to
> allocate memory. This is done to have the memory address as a multiple of
> the size of the variable. This speeds up the processing of these variables
> by the compiler.
>
> On Tue, Jul 26, 2011 at 8:09 PM, Puneet Gautam
> <[email protected]>wrote:
>
>> what is meant by padding in self_referenced structure?
>> Is it always necessary?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>
>
> --
> Nikhil Gupta
> Senior Co-ordinator, Publicity
> CSI, NSIT Students' Branch
> NSIT, New Delhi, India
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.