I humbly beg to differ. I've told the kernel to use exactly (or "just short
of" in your terminology) 60 MB and that's what it's doing. It hasn't
touched the memory from the 60 MB address up to the top of physically
installed memory which is 64 MB so there is 4 MB (more or less, the
exactness doesn't matter) of memory that I can use for any purpose I choose
via mmap() in user space and directly addressing in kernel space.
Norm
> -----Original Message-----
> From: Fred Proctor [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, September 17, 1999 12:01 PM
> To: Dresner, Norman A.
> Cc: 'rtl'
> Subject: Re: [rtl] strange return from mmap()
>
> Dresner, Norman A. wrote:
> >
> > I'm trying to set up shared memory
> > in user-space but using the MAP_FIXED qualifier, I get a strange return
> from
> > mmap() as follows:
> > 1. The value of the pointer returned is 0
> > 2. No error is declared (errno = 0 on return)
> ...
> > The setup is as follows:
> ...
> > 2. 64 MB RAM
> ...
> > 5. lilo.conf contains: append="mem=60m"
>
> You have specified to set aside exactly 4 MB of memory, since you have a
> 64 MB machine and mem=60m in /etc/lilo.conf. However, shared memory is
> only set aside between where you tell Linux to stop (short of 60 MB) and
> the next address evenly divisible by 4 MB, which is 60 MB. So, you have
> no shared memory left.
>
> If you need exactly 4 MB you are out of luck. Try this:
>
> append="mem=61m"
>
> for 3 MB of shared memory. You can use hex numbers, e.g.,
>
> append="mem=0x3D00000"
>
> which makes it easier to compose amounts like 3.75 MB, e.g.,
>
> append="mem=0x3C40000"
>
> Check my hex math; you get the picture. I don't know how close to the
> border you can get, e.g.,
>
> append="mem=0x3C00001"
>
> for one byte less than 4 MB may not work.
>
> --Fred
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/