Speicherverwaltung bei Linux
Dietmar Goldbeck
dietmar.goldbeck at acm.org
Sat Oct 7 20:34:22 CEST 2000
On Fri, Oct 06, 2000 at 11:41:45AM +0200, Florian Lohoff wrote:
> On Thu, Oct 05, 2000 at 09:37:44PM +0200, Christian Weddeling wrote:
> > Hallo!
> >
> > Wenn ich unter C++ ein new char [4096] mache, wieviel Speicher
> > wird dann wiklich verwendet?
> >
> > Ich koennte mir vorstellen, dass C++ 4 Bytes fuer die Laenge des
> > Arrays benoetigt, um nachher ein delete[] machen zu koennen. Aber
> > was bleibt noch zusaetzlich alles im Kernel haengen?
>
> Probier doch mal strace/ltrace oder "electric-fence" oder aehnliche
> malloc debugger..
>
Ich glaube nicht, das er damit den kernel_internen_ Bedarf
für ein Array herausbekommt. Das ist aber auch ein extra Thema.
IIRC braucht der Kernel ungefähr 150 Byte je Kachel für die MMU Verwaltung.
Allerdings weiß ich nicht wieweit ein Prozeß mit einem new char [4096]
überhaupt dazu führt, das sich da etwas am Bedarf ändert.
Ciao
Dietmar
--
Alles Gute / best wishes
Dietmar Goldbeck E-Mail: dietmar.goldbeck at acm.org
Reporter (to Mahatma Gandhi): Mr Gandhi, what do you think of Western
Civilization? Gandhi: I think it would be a good idea.
More information about the Linux
mailing list