Skip to content

Commit

Permalink
Merge pull request #4700 from Cauterite/patch-1
Browse files Browse the repository at this point in the history
Windows is supported; docs said otherwise
  • Loading branch information
dnadlinger authored Aug 7, 2016
2 parents d7e5537 + a12690a commit 1efdcd5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions std/experimental/allocator/mmap_allocator.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ module std.experimental.allocator.mmap_allocator;
// MmapAllocator
/**
Allocator (currently defined only for Posix) using $(D $(LUCKY mmap)) and $(D
$(LUCKY munmap)) directly. There is no additional structure: each call to $(D
allocate(s)) issues a call to $(D mmap(null, s, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)), and each call to $(D deallocate(b)) issues
$(D munmap(b.ptr, b.length)). So $(D MmapAllocator) is usually intended for
allocating large chunks to be managed by fine-granular allocators.
Allocator (currently defined only for Posix and Windows) using $(D $(LUCKY mmap))
and $(D $(LUCKY munmap)) directly (or their Windows equivalents). There is no
additional structure: each call to $(D allocate(s)) issues a call to
$(D mmap(null, s, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)),
and each call to $(D deallocate(b)) issues $(D munmap(b.ptr, b.length)).
So $(D MmapAllocator) is usually intended for allocating large chunks to be
managed by fine-granular allocators.
*/
struct MmapAllocator
Expand Down

0 comments on commit 1efdcd5

Please sign in to comment.