Merge remote-tracking branch 'upstream/stable' into merge_stable

This commit is contained in:
Sebastian Wilzbach 2018-01-08 16:38:23 +01:00
commit c94d93e121
27 changed files with 110 additions and 31 deletions

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_affix_allocator.d)
*/
module std.experimental.allocator.building_blocks.affix_allocator;
/**

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_allocator_list.d)
*/
module std.experimental.allocator.building_blocks.allocator_list;
import std.experimental.allocator.building_blocks.null_allocator;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_bitmapped_block.d)
*/
module std.experimental.allocator.building_blocks.bitmapped_block;
import std.experimental.allocator.building_blocks.null_allocator;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_bucketizer.d)
*/
module std.experimental.allocator.building_blocks.bucketizer;
/**

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_fallback_allocator.d)
*/
module std.experimental.allocator.building_blocks.fallback_allocator;
import std.experimental.allocator.common;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_free_list.d)
*/
module std.experimental.allocator.building_blocks.free_list;
import std.experimental.allocator.common;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_free_tree.d)
*/
module std.experimental.allocator.building_blocks.free_tree;
import std.experimental.allocator.common;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_kernighan_ritchie.d)
*/
module std.experimental.allocator.building_blocks.kernighan_ritchie;
import std.experimental.allocator.building_blocks.null_allocator;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_null_allocator.d)
*/
module std.experimental.allocator.building_blocks.null_allocator;
/**

View file

@ -1,3 +1,4 @@
// Written in the D programming language.
/**
$(H2 Assembling Your Own Allocator)
@ -280,6 +281,8 @@ $(COMMENT $(TR $(TDC2 InternalPointersTree) $(TD Adds support for resolving inte
pointers on top of another allocator.)))
)
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_package.d)
Macros:
MYREF2 = $(REF_SHORT $1, std,experimental,allocator,building_blocks,$2)
MYREF3 = $(REF_SHORT $1, std,experimental,allocator,$2)

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_quantizer.d)
*/
module std.experimental.allocator.building_blocks.quantizer;
import std.experimental.allocator.common;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_region.d)
*/
module std.experimental.allocator.building_blocks.region;
import std.experimental.allocator.building_blocks.null_allocator;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_scoped_allocator.d)
*/
module std.experimental.allocator.building_blocks.scoped_allocator;
import std.experimental.allocator.common;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_segregator.d)
*/
module std.experimental.allocator.building_blocks.segregator;
import std.experimental.allocator.common;

View file

@ -4,15 +4,18 @@ Allocator that collects useful statistics about allocations, both global and per
calling point. The statistics collected can be configured statically by choosing
combinations of `Options` appropriately.
Example:
----
import std.experimental.allocator.gc_allocator : GCAllocator;
import std.experimental.allocator.building_blocks.free_list : FreeList;
alias Allocator = StatsCollector!(GCAllocator, Options.bytesUsed);
----
Source: $(PHOBOSSRC std/experimental/allocator/building_blocks/_stats_collector.d)
*/
module std.experimental.allocator.building_blocks.stats_collector;
///
@safe unittest
{
import std.experimental.allocator.gc_allocator : GCAllocator;
import std.experimental.allocator.building_blocks.free_list : FreeList;
alias Allocator = StatsCollector!(GCAllocator, Options.bytesUsed);
}
import std.experimental.allocator.common;
/**

View file

@ -1,9 +1,12 @@
// Written in the D programming language.
/**
Utility and ancillary artifacts of `std.experimental.allocator`. This module
shouldn't be used directly; its functionality will be migrated into more
appropriate parts of `std`.
Authors: $(HTTP erdani.com, Andrei Alexandrescu), Timon Gehr (`Ternary`)
Source: $(PHOBOSSRC std/experimental/allocator/_common.d)
*/
module std.experimental.allocator.common;
import std.algorithm.comparison, std.traits;

View file

@ -1,10 +1,15 @@
///
// Written in the D programming language.
/**
D's built-in garbage-collected allocator.
Source: $(PHOBOSSRC std/experimental/allocator/_gc_allocator.d)
*/
module std.experimental.allocator.gc_allocator;
import std.experimental.allocator.common;
/**
D's built-in garbage-collected allocator.
*/
*/
struct GCAllocator
{
import core.memory : GC;

View file

@ -1,4 +1,9 @@
///
// Written in the D programming language.
/**
The C heap allocator.
Source: $(PHOBOSSRC std/experimental/allocator/_mallocator.d)
*/
module std.experimental.allocator.mallocator;
import std.experimental.allocator.common;

View file

@ -1,9 +1,10 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/allocator/_mmap_allocator.d)
*/
module std.experimental.allocator.mmap_allocator;
// MmapAllocator
/**
Allocator (currently defined only for Posix and Windows) using
$(D $(LINK2 https://en.wikipedia.org/wiki/Mmap, mmap))
and $(D $(LUCKY munmap)) directly (or their Windows equivalents). There is no
@ -12,7 +13,6 @@ $(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
{

View file

@ -1,9 +1,10 @@
// Written in the D programming language.
/**
Collection of typical and useful prebuilt allocators using the given
components. User code would typically import this module and use its
facilities, or import individual heap building blocks and assemble them.
Source: $(PHOBOSSRC std/experimental/allocator/_showcase.d)
*/
module std.experimental.allocator.showcase;

View file

@ -1,3 +1,4 @@
// Written in the D programming language.
/**
This module defines `TypedAllocator`, a statically-typed allocator that
aggregates multiple untyped allocators and uses them depending on the static
@ -5,6 +6,8 @@ properties of the types allocated. For example, distinct allocators may be used
for thread-local vs. thread-shared data, or for fixed-size data (`struct`,
`class` objects) vs. resizable data (arrays).
Source: $(PHOBOSSRC std/experimental/allocator/_typed.d)
Macros:
T2=$(TR <td style="text-align:left">$(D $1)</td> $(TD $(ARGS $+)))
*/

View file

@ -1,3 +1,4 @@
// Written in the D programming language.
/**
$(SCRIPT inhibitQuickIndex = 1;)
@ -187,6 +188,7 @@ and `>>>=` is larger than the largest value representable by `T`.)
)
)
Source: $(PHOBOSSRC std/experimental/_checkedint.d)
*/
module std.experimental.checkedint;
import std.traits : isFloatingPoint, isIntegral, isNumeric, isUnsigned, Unqual;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/logger/_core.d)
*/
module std.experimental.logger.core;
import core.sync.mutex : Mutex;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/logger/_filelogger.d)
*/
module std.experimental.logger.filelogger;
import std.experimental.logger.core;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/logger/_multilogger.d)
*/
module std.experimental.logger.multilogger;
import std.experimental.logger.core;

View file

@ -1,4 +1,7 @@
///
// Written in the D programming language.
/**
Source: $(PHOBOSSRC std/experimental/logger/_nulllogger.d)
*/
module std.experimental.logger.nulllogger;
import std.experimental.logger.core;

View file

@ -1,3 +1,4 @@
// Written in the D programming language.
/**
Implements logging facilities.
@ -176,6 +177,8 @@ $(D ArrayLogger) contains an array of $(D Logger) and also propagates log
calls to its stored $(D Logger). The $(D NullLogger) does not do anything. It
will never log a message and will never throw on a log call with $(D LogLevel)
$(D error).
Source: $(PHOBOSSRC std/experimental/logger/_package.d)
*/
module std.experimental.logger;