Class System.Memory


A popular demand is a class representing a raw piece of memory or a mmap'ed file. This is usually not the most effective way of solving a problem, but it might help in rare situations.

Using mmap can lead to segmentation faults in some cases. Beware, and read about mmap before you try anything. Don't blame Pike if you shoot your foot off.

Method create

System.Memory System.Memory()
System.Memory System.Memory(string|Stdio.File filename_to_mmap)
System.Memory System.Memory(int shmkey, int shmsize, int shmflg)
System.Memory System.Memory(int bytes_to_allocate)


Will call mmap() or allocate() depending on argument, either mmap'ing a file (in shared mode, writeable if possible) or allocating a chunk of memory.