Per Nordlöw
28aec22c22
Add isAllocator ( #8598 )
2022-10-13 17:42:03 +08:00
nordlow
f8bc7a1181
Annotate allocator/common.d to please dlang/dmd#12520
2021-05-17 05:21:35 +02:00
berni44
b2019ebab0
Narrow imports of std.math in the rest of phobos.
2021-04-21 03:00:57 +02:00
Nathan Sashihara
e801d54faa
std.experimental.allocator: use core.bitop for trailingZeroes and leadingOnes
2020-05-15 10:34:20 -07:00
Alexandru Militaru
bb62aaca3d
Replaced version (unittest) with version (StdUnittest) to avoid unnecessary overhead when compiling with -unittest
2020-01-19 14:05:17 +02:00
Iain Buclaw
fd5facfe04
posix.mak: Enforce whitespace before opening parenthesis for version conditions
2018-09-22 16:57:24 +02:00
Nathan Sashihara
3255a2ebbb
Replace isInitAllZeroBits with new __traits(isZeroInit)
...
Requires https://github.com/dlang/dmd/pull/8583 .
Also remove isInitAllOneBits and replace with direct check for
char/wchar. isInitAllOneBits had the same problem with unreasonable
memory usage as the old isInitAllZeroBits
(https://issues.dlang.org/show_bug.cgi?id=18937 ).
2018-09-09 11:27:38 -04:00
Sebastian Wilzbach
6479a70a3b
Fix Issue 19085 - std.experimental.allocator.makeArray should work with void
2018-09-01 13:50:31 -04:00
Martin Kinkelin
cce577165b
Fix std.experimental.allocator.common.effectiveAlignment()
...
It was unable to handle alignments > 2^31 bytes, e.g., returning 2 for
the 64-bit pointer 0x2FA_00000000. Return a size_t instead of a uint.
Note that it's only called in one place, an assertion in a ctor of the
BitmappedBlockImpl mixin, which handles size_t fine.
This fixes sporadic
std.experimental.allocator.building_blocks.bitmapped_block unittest
failures for LDC CI on Win64 (something like 1 out of 100 runs failing).
2018-06-29 19:23:37 +02:00
Martin Nowak
75feb5726a
Merge pull request #6537 from aG0aep6G/18937
...
fix issue 18937 - [REG 2.080.0] std.experimental.allocator: compiling…
2018-06-25 15:14:47 +02:00
Sebastian Wilzbach
c324714fde
Remove a few cases of underscore escaping
2018-06-04 13:05:01 +02:00
aG0aep6G
f6bd7ab436
style: make opEquals const
2018-06-04 01:17:59 +02:00
aG0aep6G
6eb189d95d
handle funky opEquals
...
Also switch to CTFE `foreach`, because the template-level code has no speed
advantage anymore in the `T.init` case, and the CTFE loop is faster in the
other cases.
2018-06-04 01:02:34 +02:00
aG0aep6G
063a3a86ba
style
2018-06-03 18:27:39 +02:00
aG0aep6G
86af9e6bce
fix issue 18937 - [REG 2.080.0] std.experimental.allocator: compiling make
needs an unreasonable amount of memory for structs that contain static arrays
2018-06-03 15:34:38 +02:00
Nathan Sashihara
6848fa9646
make/makeArray: take advantage of allocators with smth. faster than allocate+memset zero
2018-04-15 17:48:29 -04:00
Steven Schveighoffer
6b72ce316d
Trim as much version(unittest) as possible from allocator ( #6452 )
...
* Trim as much version(unittest) as possible from allocator
* improve internal test function addr to m_addr (and fix verbosity a bit)
* Remove shared from RCISharedAllocator, as it's already shared
* Fix issue with m_addr
2018-04-13 22:02:00 +03:00
Sebastian Wilzbach
42894784dd
Markdownify Phobos
...
$(D word) -> `word`
2018-04-02 22:32:47 +02:00
The Dlang Bot
6797b52c0d
Merge pull request #6024 from n8sh/uninitializedFillDefault-memset
...
Fix Issue 18223: use memset in uninitializedFillDefault(T[])
merged-on-behalf-of: unknown
2018-03-31 06:58:26 +02:00
Nathan Sashihara
8777cbf355
Fix Issue 18223: use memset in uninitializedFillDefault(T[])
...
When we can statically determine that the representation of T.init
consists of nothing but zeroes or nothing but ones we use memset.
(The second case occurs for char and wchar.)
2018-03-28 13:59:19 -04:00
Sebastian Wilzbach
8f86a0d734
Fix if constraints indentation
2018-03-24 13:17:53 +01:00
Jack Stouffer
663b5b9278
Revert addition of StdUnittest
2018-02-20 13:32:32 -05:00
Jack Stouffer
18cbb29b04
Replaced version(unittest) blocks with version(StdUnittest)
2018-02-01 19:56:59 -05:00
Eduard Staniloiu
573a85b101
Replace IAllocator with reference counted struct
2018-01-25 14:19:21 +01:00
Sebastian Wilzbach
639c07e942
Fix Issue 16017 - package functions show up in std.experimental.allocator.common docs
2018-01-12 23:01:54 +01:00
Sebastian Wilzbach
233e90bdc1
Add PHOBOSSRC urls to std.experimental
2018-01-08 02:52:50 +01:00
Alexandru Jercaianu
f529c855ae
Fix Issue 17986 - Erratic failure with std/experimental/allocator/common.d(445): unittest failure
2017-11-17 12:15:05 +02:00
Alexandru Jercaianu
b619323193
added testcase for alignedReallocate
...
replaced ulong with size_t
spaces after cast
2017-11-14 20:00:57 +02:00
Alexandru Jercaianu
4df0c64179
alignedReallocate checks for alignment if sizes are equal
2017-11-14 18:38:11 +02:00
Alexandru Jercaianu
1f63f2d039
Added constraint for Allocator to have alignedAllocate
2017-11-10 15:31:00 +02:00
Alexandru Jercaianu
9bad191d6a
alignedReallocate returns false if alignedAllocate fails
...
FallbackAllocator requires both allocators to be stateless when running tests
fallback test
2017-11-09 13:45:48 +02:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
...
This reverts commit 998ad51fd7
.
2017-06-13 17:51:52 +00:00
Sebastian Wilzbach
998ad51fd7
Sort selective imports
2017-06-12 08:12:09 +02:00
Sebastian Wilzbach
61717ecc7d
Sort imports
2017-06-12 07:54:38 +02:00
Sebastian Wilzbach
1e7f7a1ba2
Revert "Use OpaquePointer as a safe support for region based allocators"
2017-06-08 09:45:31 +02:00
Andrei Alexandrescu
5cc9d8b1a8
Eliminate failing assert on 32 bit platforms
2017-06-08 00:40:14 +03:00
Eduard Staniloiu
79cf4ab913
Use OpaquePointer as a safe support for region based allocators
2017-06-08 00:40:14 +03:00
Eduard Staniloiu
5bc80e6dd6
Add ISharedAllocator and have the _processAllocator use it
2017-05-01 02:52:50 +03:00
Eduard Staniloiu
dd304f635b
Allow AffixAllocator to work with IAllocator
2017-03-16 14:44:46 +02:00
Eduard Staniloiu
85000db4be
Make the resolveInternalPointer method abide the IAllocator API
2017-03-15 16:54:31 +02:00
Sebastian Wilzbach
a36cec8686
DScanner: automatially set all unattributed unittests to @safe or @system
2017-02-22 05:42:04 +01:00
Sebastian Wilzbach
d331a5d176
Extend reallocate test for all Allocators
2016-08-03 03:10:41 +02:00
Jack Stouffer
f085c82bf6
Removed global std.math import from std.experimental.allocator.common
2016-07-03 21:39:59 -04:00
Jack Stouffer
79e87255ba
Fixed std.algorithm import in std.experimental.allocator.common to not be package wide
2016-07-03 21:38:30 -04:00
Andrei Alexandrescu
7172eda466
Merge pull request #4327 from tsbockman/isPowerOf2
...
Add `std.math.isPowerOf2()`. Supports floating-point and integers.
2016-06-16 23:09:02 -04:00
Sebastian Wilzbach
ec47ac4224
Remove the WEB macro in favor of HTTP
...
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
tsbockman
18d1b436e4
Update Phobos to use the new std.math.isPowerOf2()
everywhere.
...
`std.uni` looks like it may depend upon its local `isPowerOf2()` implementation
to return `true` for `0`. Since the semantics are different from the standard
version, I have renamed it to `isPow2OrZero()` to avoid confusion.
2016-06-04 21:19:38 -07:00
Steven Schveighoffer
bc63d2b949
Merge pull request #4372 from andralex/allocator-change-expand
...
Change semantics of expand: the null array cannot be expanded 'in place'
2016-05-27 17:45:44 -04:00
Andrei Alexandrescu
8ecabe23f2
Change semantics of expand: the null array cannot be expanded 'in place'
2016-05-27 16:36:01 -04:00
Andrei Alexandrescu
b94026470d
Merge pull request #4307 from JackStouffer/allocator
...
Move Ternary from std.experimental.allocator.common to std.typecons
2016-05-24 10:29:23 -04:00