| Index: src/platform-solaris.cc
 | 
| ===================================================================
 | 
| --- src/platform-solaris.cc	(revision 6353)
 | 
| +++ src/platform-solaris.cc	(working copy)
 | 
| @@ -226,6 +226,7 @@
 | 
|      : file_(file), memory_(memory), size_(size) { }
 | 
|    virtual ~PosixMemoryMappedFile();
 | 
|    virtual void* memory() { return memory_; }
 | 
| +  virtual int size() { return size_; }
 | 
|   private:
 | 
|    FILE* file_;
 | 
|    void* memory_;
 | 
| @@ -233,6 +234,19 @@
 | 
|  };
 | 
|  
 | 
|  
 | 
| +OS::MemoryMappedFile* OS::MemoryMappedFile::open(const char* name) {
 | 
| +  FILE* file = fopen(name, "w+");
 | 
| +  if (file == NULL) return NULL;
 | 
| +
 | 
| +  fseek(file, 0, SEEK_END);
 | 
| +  int size = ftell(file);
 | 
| +
 | 
| +  void* memory =
 | 
| +      mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fileno(file), 0);
 | 
| +  return new PosixMemoryMappedFile(file, memory, size);
 | 
| +}
 | 
| +
 | 
| +
 | 
|  OS::MemoryMappedFile* OS::MemoryMappedFile::create(const char* name, int size,
 | 
|      void* initial) {
 | 
|    FILE* file = fopen(name, "w+");
 | 
| 
 |