From mboxrd@z Thu Jan 1 00:00:00 1970 From: dhylands@gmail.com (Dave Hylands) Date: Fri, 17 Jun 2011 10:59:19 -0700 Subject: Build scatterlist covering a process' text segment? In-Reply-To: <8B479D44-48BC-464C-B4D6-6CF0F7138E52@gmail.com> References: <4DDAE865.6000608@enea.com> <4DDD663C.4060201@enea.com> <4DE01E94.8000505@enea.com> <4DFAA41D.5010307@enea.com> <20110617151014.GB1451@debian.debian> <8B479D44-48BC-464C-B4D6-6CF0F7138E52@gmail.com> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi, On Fri, Jun 17, 2011 at 8:18 AM, Metin KAYA wrote: > Jonathan, it's kmalloc(), not kcalloc(). The kernel's kmalloc doesn't initialize the memory. There is a function called kzalloc which will allocate and zero the memory, which is sort of similar to the user-space calloc function, although calloc takes num-of-items and size-of-one-item, whereas kzalloc takes "size-of-allocation". -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com