Tobias DiPasquale on 18 May 2004 18:05:03 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] ldt_modify and detailed information


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 18 May 2004 13:39, aglist@metashadow.com wrote:
| but i did not know in depth how it works. that's why i want to look up how
| linux handles/creates the default segments and user created segments.  i
| have more questions like "if i malloc 64M+ of memory, are all the pages
| automatically created, or does it only create pages and table entries as
| the memory is accessed."

In Linux, all pages are accounted for at boot time. Pages are then assigned or 
deassigned as necessary.

| the same question goes for user created 
| segments.  i do not want to use all my swap space on empty pages and
| really large page directories.

This would be handled via the ELF format in some way. If allowed for by the 
ELF specifications, you would include your custom segment in the binary 
somehow and possibly dictate how you would like it to be handled. This may 
require the introduction of new code into libc and/or the kernel to make 
happen properly, however. A good reading of the ELF spec should set you on 
the right track, followed by an investigation of the mm/ subdir in the Linux 
kernel sources.

- -- 
Tobias DiPasquale
202A 04C4 2CE6 B985 8520  88D6 CD25 1A6C B9B5 1595
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAqlAnzSUabLm1FZURAg7TAKCmsnIh+v/8b21a3in9cJRNsXR/aACfTf8G
8RkKLBmr6/XoQYevwHd4g4k=
=e/Dv
-----END PGP SIGNATURE-----
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug