[geeks] RAMDISK Usage and Accessing through C Programming

Jonathan C. Patschke jp at celestrion.net
Sat Dec 20 03:25:46 CST 2003


On Sat, 13 Dec 2003, Amit wrote:

> I am having Solaris 8. I want to install/use a RAMDISK for one of my
> Applications, that need to dynamically allocate/deallocate memory.

  1) Solaris does not support ramdisks.
  2) This will not do what you want.

Ramdisks are partitions of memory that contain a filesystem.  They are
not accessible through any means other than through the filesystem.  You
can't, for example, mount a ramdisk, create a file in that part of the
filesystem and have it automatically map into a program's memory.

> Currently I am using C calls viz. malloc and calloc.

That's what you want to do.  If the alloc-family functions are too
tedious for you, perhaps you should look into a language with automated
memory management, such as Java, which runs very nicely on Solaris and
has a syntax similar to C.

-- 
Jonathan Patschke  ) "Earth works.  That's proof positive that Mother
Elgin, TX         (   Nature isn't a suit."            --Dave McGuire



More information about the geeks mailing list