Skip to content

Commit

Permalink
[trivial] Windows is supported; docs said otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
Cauterite authored Jul 31, 2016
1 parent d7a7173 commit a12690a
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 a12690a

Please sign in to comment.