linux-mips
[Top] [All Lists]

kmalloc issue on MIPS target

To: majordomo@kvack.org, linux-mips@linux-mips.org
Subject: kmalloc issue on MIPS target
From: naveen yadav <yad.naveen@gmail.com>
Date: Wed, 18 Aug 2010 18:07:12 +0530
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=su5K4IYYNSgQup/IYoXE1E7BxIsXA8ZOB1EcahW6diE=; b=hy9aizNtKub/RAgECEud8f3aM7/sF8Q5toxXG1iLCi4A/bzE+3y7zyUopM3HP0iayM 7A0EkE1gNbVmTMdyPvN+21DHcEZuev+S80xk9sHP6dCBm95RcdOmrG1xIQQZKt/xGeHK UEItMTpwPlzph/YjBnjySmiPnhAL2t+1xV0vY=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=EtBfCYalAa6eiuHsVmx82co1k+qhXm52wfnV4N9ZC9xBUbyXfTSuwntBVbDisMKs5W iyw4ixu76fcxWjySJC1O+HBqvvmPMSlLtYuewhafPXvvErvf+1g44746G5Hca6eD7U6t 4IKDFGRhMjjnBxnXPlujeSCW+7yuS5f6kDkhY=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Hi All,

We are using MIPS(mips32r2) target. when I alloc memory using kmalloc
suppose  28 bytes, the kernel still consume 128 bytes.

So when I check File on kernel source  mach-ip32/kmalloc.h

Since it is allign to 128 bytes so i understand that even if  I
consume 1 byte it will waste 128 bytes.

#ifndef __ASM_MACH_IP32_KMALLOC_H
#define __ASM_MACH_IP32_KMALLOC_H


#if defined(CONFIG_CPU_R5000) || defined(CONFIG_CPU_RM7000)
#define ARCH_KMALLOC_MINALIGN   32
#else
#define ARCH_KMALLOC_MINALIGN   128
#endif

#endif /* __ASM_MACH_IP32_KMALLOC_H */


So I could not understand why it is allign to 128 bytes. Is there any
specific reason for it. ?

thanks

<Prev in Thread] Current Thread [Next in Thread>