Swap space - The Answer

Dan Osterrath do3 at mail.inf.tu-dresden.de
Mon Nov 11 18:18:27 PST 2002


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

> >Of course the counter is data! But what happens when the counters address
> > is in the code segment? Will the code segment be swapped or will it be
> > dropped out of memory and later re-read from filesystem?
> Anything that is dynamic is part of data, and that includes pointers.

No here's an example in pseudo assembler (as my ast assembler experience was 
on 16bit machines):

mov ip,bx
jump [bx+128]
nop
nop
nop
nop
nop
nop
nop
nop
mov [bx+64],ax
inc ax
mov ax,[bx+64]

As you can seem we make a jump over the pointer and then increase the pointer 
that is somewhere at the nop's.
All this can be in the code segment - no need for pointers.
As I remeber that was the general solutions for .com-files in DOS as these 
files have limited segment sizes and amounts. (I think only one 64k code 
segment, no data segments; but this was quite long ago.)

- -- 
- ----------------------------------------------------------------------
%> ln -s /dev/null /dev/brain
%> ln -s /dev/urandom /dev/world
%> dd if=/dev/world of=/dev/brain
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE90GTz9NbB8EM160MRApgNAJ4qVnhMu2uH5x0VtI0xyvBOwpw8DQCfaj2P
jOELEveFOOBStthFFdhPM6Q=
=WL7g
-----END PGP SIGNATURE-----

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list