UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

  • Index
  • » C
  • » memory management

#1 2007-08-14 02:49 AM

zhn636
Member
Registered: 2007-04-24
Posts: 146

Re: memory management

can anyone give me some algorithms about the management of the memory segmention in the linux? how do we avoid the occurrence of the memory segmentions?

Offline

#2 2007-08-14 10:58 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: memory management

What do you mean with "memory segmention"?

Do you mean memory segmentation as can be done on x86 CPU's, or do you mean regular memory handling? (Allocation e.d.)

Offline

#3 2007-08-14 07:22 PM

jfriesne
Administrator
From: California
Registered: 2005-07-06
Posts: 348
Website

Re: memory management

Offline

#4 2007-08-15 02:03 AM

zhn636
Member
Registered: 2007-04-24
Posts: 146

Re: memory management

Yes ,I want to know how to avoid memory fragmentation,how many method  can we adopt to avoid memory fragmentation ? in the linux kernel implemention , what method it use to do this?Thanks

Offline

#5 2007-08-15 02:11 AM

zhn636
Member
Registered: 2007-04-24
Posts: 146

Re: memory management

if we want to  allocate a small chuck memory,what function can we use to avoid fragmention? vmalloc or kmalloc?

Offline

#6 2007-08-15 02:35 AM

jfriesne
Administrator
From: California
Registered: 2005-07-06
Posts: 348
Website

Re: memory management

Offline

#7 2007-08-15 02:42 AM

zhn636
Member
Registered: 2007-04-24
Posts: 146

Re: memory management

oh,whether the vmalloc can avoid memory fragmention happen? if I want to get 300M memory ,what method can I use? kmalloc?

Offline

#8 2007-08-15 01:32 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,839
Website

Re: memory management

300M in kernel space??  I think you must be doing something wrong...  What exactly
are you writing?

Offline

#9 2007-08-15 03:07 PM

zhn636
Member
Registered: 2007-04-24
Posts: 146

Re: memory management

oh,thanks, I write wrong, I want to get 300B memory,which method I can use?

Offline

#10 2007-08-15 05:10 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: memory management

Follow the links jfriesne gave, and read that chapter. It's worth the time.

Offline

  • Index
  • » C
  • » memory management

Board footer

Powered by FluxBB