Ramdisk is a block device that stores data in RAM.
make
sudo insmod ram-disk.ko
sudo rmmod ram-disk
sudo mkfs.ext4 /dev/myblockdevice
sudo mkdir /mnt/ramdisk
sudo mount /dev/myblockdevice /mnt/ramdisk
cd /mnt/ramdisk
touch testfile.txt
echo "Hello, RAM-disk!" > testfile.txt
cat testfile.txt
sudo umount /mnt/ramdisk