source: proiecte/swift/trunk/lib/hoard-371/src/mmapalloc.h

Last change on this file was 176, checked in by (none), 14 years ago
  • imported repo from "guagal"
File size: 416 bytes
Line 
1// -*- C++ -*-
2
3#ifndef _MMAPALLOC_H_
4#define _MMAPALLOC_H_
5
6#include <stdio.h>
7
8#include "mmapwrapper.h"
9
10/**
11 * @class MmapAlloc
12 * @brief Obtains memory from Mmap but doesn't allow it to be freed.
13 * @author Emery Berger <http://www.cs.umass.edu/~emery>
14 */
15
16namespace Hoard {
17
18class MmapAlloc {
19public:
20  void * malloc (size_t sz) {
21    void * ptr = HL::MmapWrapper::map (sz);
22    return ptr;
23  }
24
25};
26
27}
28
29#endif
Note: See TracBrowser for help on using the repository browser.