linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tushar  korde" <tushar_k5@rediffmail.com>
To: linux-kernel@vger.kernel.org
Date: 8 Jun 2002 21:35:27 -0000	[thread overview]
raw)

hi folks,
 	as kmalloc allocates memory in power of 2 ( starting from 32 )
instead of the size requested. there are following problems :

  1) we are allocating at least 32 bytes in all cases ( most of 
the times it is not
required ).

  2) if we allocate large memory, internal fregmentation also 
increases.

  3) allocating more memory then the request often leads to 
programming errors
esp. when we store some data and read it back or try to get size 
of data stored
  ( though it can be handled but we have to take special care of 
it at every point ).

the solution to above problems may be that we dont allocate 
objects from the 13
general purpose caches, instead we make a new cache keep its 
address either in
cache_sizes or declare it global. now as the kmalloc is invoked 
check the memory size
requested if predefined sizes are not suitable then make a new 
object of the size
requested ( now here the definition of c_offset flag of cache 
descriptor may be
violated ) and allot it to our new cache and return it .

 	i know that there may be subtle problems in it's 
implementation.
i need your suggestions. is it worth to make efforts in this 
field.

keenly waitinf for ur reply
tushar korde
_________________________________________________________
Click below to visit monsterindia.com and review jobs in India or 
Abroad
http://monsterindia.rediff.com/jobs


             reply	other threads:[~2002-06-08 21:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-08 21:35 tushar  korde [this message]
2002-08-21 16:30 ` Daniel Phillips

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020608213527.28801.qmail@webmail6.rediffmail.com \
    --to=tushar_k5@rediffmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).