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

RE: Some memory reallocation in kernel mode



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

 

> -----Original Message-----
> From:	Ketan Mehta [SMTP:ketan.mehta@xxxxxxxxx]
> Sent:	Thursday, December 07, 2000 9:23 PM
> Cc:	linux-india-programmers@xxxxxxxxxxxxxxxxxxxxx
> 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.
> 
> ---------------------------------------------
> The mailing list archives are available at
> http://lists.linux-india.org/cgi-bin/wilma/LIP