Re: kmalloc question

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

 



Borislav Petkov (petkov@xxxxxxxxxxxxxxx) wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi there people,
> i only need a confirmation on some unclear issues concerning the following 
> function:
> [...]
> I understand that the CACHE macro is used to search the malloc_sizes array to 
> find a slab object that is (size <= x) and if it is found, we jump to the 
> found label where we call kmem_cache_alloc(). After we #undef CACHE, we have 
> a block with that external function that is declared nowhere. After googling 
> a while, I think I know what this does but i'm not sure - when, at compile 
> time, something requests a slab object that is bigger than the alloc'd ones, 
> we break compilation and force the caller to change its call to kmalloc in 
> order to request a more suitable size object. I don't understand the thoughts 
> behind that, though, thus my question.
> 
> Thanks in advance for your help,
> Boris.

The answer is in this really good books :
http://www.xml.com/ldd/chapter/book/ch07.html

Sorry, I know it is a easy answer, but I have read it and it is better
to do this job by himself on this kind of learn.

HTH
-- 
Amicalement/Regards

Christophe Lucas - c.lucas@xxxxxxxxxxx - Registered User #271267

 * GNU/Linux developer/network administrator
 * Membre du RotomaLUG (LUG de la région Rouennaise)
   (http://www.rotomalug.org)
 * http://odie.mcom.fr/~clucas/

Attachment: signature.asc
Description: Digital signature


[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