[lkml]   [2000]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 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, 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)



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:41    [W:0.039 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site