Subject: dynamic memory allocation problem
To: None <tech-kern@netbsd.org>
From: ycchang <ycchang@cirx.org>
List: tech-kern
Date: 05/25/2003 11:16:33
This is a multi-part message in MIME format.
------=_NextPart_000_001F_01C322AF.1962C370
Content-Type: text/plain;
charset="big5"
Content-Transfer-Encoding: quoted-printable
Hi, All
Recently, I' m studying the vm of NetBSD from the source code, but I =
still can not figure out what kinds of dynamic=20
memory allocation mechanism does the kernel provide. As in Linux, =
it's very clear that the dynamic memory is allocated
totally from the buddy system, such as alloc_pages(), and the slab =
allocator uses it to provide cache for efficient kernel=20
data structure allocation, such as kmem_alloc or kmalloc(), =
finally, if we want nonconti. memory , we can use vmalloc().=20
In NetBSD, does any one can tell me roughly the guidelines of =
dynamic memory allocation? I have traced the code, but=20
it seems that various purpose dynamic memory allocation functions =
call each other(uvm, pmap etc.), and I can not figure
out the relationship among them.
=
Regards,
=
ycchang
------=_NextPart_000_001F_01C322AF.1962C370
Content-Type: text/html;
charset="big5"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dbig5">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>
<DIV><FONT size=3D2>Hi, All</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2> Recently, I' m studying the vm of =
NetBSD=20
from the source code, but I still can not figure out what kinds of =
dynamic=20
</FONT></DIV>
<DIV><FONT size=3D2> memory allocation =
mechanism does=20
the kernel provide. As in Linux, it's very clear that the dynamic memory =
is=20
allocated</FONT></DIV>
<DIV><FONT size=3D2> totally from the buddy system, =
such=20
as alloc_pages(), and the slab allocator uses it to =
provide cache=20
for efficient kernel </FONT></DIV>
<DIV><FONT size=3D2> data structure allocation, =
such=20
as kmem_alloc or kmalloc(), finally, if we want =
nonconti.=20
memory , we can use vmalloc(). </FONT></DIV>
<DIV><FONT size=3D2> In NetBSD, does any one can tell =
me roughly=20
the guidelines of dynamic memory allocation? I have traced the code, but =
</FONT></DIV>
<DIV><FONT size=3D2> it seems that various purpose =
dynamic=20
memory allocation functions call each other(uvm, pmap etc.), and I can =
not=20
figure</FONT></DIV>
<DIV><FONT size=3D2> out the relationship among=20
them.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT=20
size=3D2> &nbs=
p;  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
=20
Regards,</FONT></DIV>
<DIV><FONT size=3D2> =
=20
=
=20
=
=20
=
=20
=
=20
=
=20
=
=20
=
=20
=20
ycchang</FONT></DIV></FONT></DIV></BODY></HTML>
------=_NextPart_000_001F_01C322AF.1962C370--