[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Some memory reallocation in kernel mode



hi,
	what u suggest is what is done by realloc.
	that is what my understanding is . since i don't have something like
realloc in kernel mode, i have to give some max chunk , copy data , then
what is there , accordiing to that create new chunk and copy to that and
free initial one... but it takes time. 
	So i want to know , how i can recover some unused memory chunk
allocated by kmalloc.
	whether it can be done or not.
	bye
ketan

"Kondaiah (IE10)" wrote:
> 
> As for as my understanding of the question: If u know how much data you got
> actually then by using kmalloc allocate that much
> amount of memory and copy the original data chunk to the allocated memory
> and free the original memory area.Correct if I am wrong..
> 
> Kondaiah dasari

> > Subject:      [LIP] Some memory reallocation in kernel mode
> >
> >
> >  Hi all,
> >          I have a situation where I have allocated a memory chunk to
> > request
> >  some data. Ultimately, I end up getting much lesser data than I had
> >  requested for. Now I want to just retain the got data and free the
> >  unused chunk from my earlier allocated chunk. How do I go about doing
> >  this?
> >          Any pointer or suggestion are welcome.
> >          TIA
> >  bye
> >  ketan
> >
> >         one thing i forgot to mention , this is in kernel mode. My code
> > is in
> >  kernel mode , so do inform accordingly.
|------------------------------------------------------------|
|It is better to keep your mouth shut and be thought a fool, |
|            than to open it and remove all doubt.	     |
|------------------------------------------------------------|
|Ketan Mehta | Wipro | Bangalore | Ph 91-80-5722296/93-5240  |
|ketan.mehta@xxxxxxxxx | ketan_kmehta@xxxxxxxxxxxx (personal)|
|------------------------------------------------------------|