[lkml]   [2001]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectramdisk size clarification
It's not at all obvious to me what the {ramdisk,ramdisk_size,rd_size}
parameters for ramdisks do from reading ramdisk.txt (note rd_size
is used when using the ramdisk as a module).

I think they only set the size to be reported, for e.g. mke2fs does
the following to determine the size of a ramdisk:

open("/dev/ram0", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, BLKGETSIZE, 0xbffff81c) = 0
close(3) = 0

However there is no actual RAM allocated until it's required,
and also there is no upper limit on the amount of RAM used,
so the following will kill your system (well it did for me):
dd if=/dev/zero of=/dev/ram0

can this be clarified in the ramdisk.txt file please.

As a side note there is a lovely "trivial ramdisk" module
written by Andrw tridgell @:
that does static allocation and (hence) doesn't grow beyond the
specified size.


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

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