Re: Doubt in sizeof () operator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



govind raj nayak wrote:
Hi,

While going through the code of IPC semaphore implementation, I encountered a statement:

new = ipc_rcu_alloc(sizeof(struct kern_ipc_perm *)*newsize +sizeof(struct ipc_id_ary))

I am not able to understand how memory will be allocated by the above statement. Inside the sizeof() operator why do we need "*newsize"? how does size of interprets *newsize?

from the above code it says get the size of structure and multiply it which a variable newsize.

so search for the value of newsize or its reference.

-Govindraj
<http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?>



--
Regards,
Mohamed Thalib H

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux