Messages in this thread | | | Date | Mon, 23 Oct 2000 08:49:32 -0400 (EDT) | From | Zhixu Liu <> | Subject | Re: about /proc/meminfo and mmap |
| |
> > My program need to a 32M buffer, so I add "append="mem=96M"" to lilo.conf, > > then the PC only know 96M mem, I can use the rest 32M. Following is a > > simple example: > > No!!! You may stomp on regions reserved by the motherboard. > > Unless you must deal with stupid DMA hardware, just use malloc(). > There is a mlock() call if you need to avoid swapping. > > Next time you ask a question, specify what you really want to do > without mentioning how you think you'd solve the problem. Maybe you > should be using SysV shared memory or anonymous mmap.
This method above is taken from http://www.isd.cme.nist.gov/projects/emc/shmem.html, and it said the buffer size should not bigger than pagesize, but I map almost 31M in a machine, that's no problem, and the memory near 32M whenI write a random number, then read out it, they are different, and the read is always 65535. So I think I can use almost 31M, or absolutely 30M. How do you think about this? (BTW, the pagesize in my machine is 4M)
Best.
Zhixu
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |