Add "native" configuration and TanyaPhobos version

This commit is contained in:
2017-08-25 00:29:43 +02:00
parent 0e99effaeb
commit c9a4a2f651
9 changed files with 425 additions and 380 deletions

View File

@ -14,6 +14,8 @@
*/
module tanya.memory.mallocator;
version (TanyaPhobos):
import core.stdc.stdlib;
import tanya.memory.allocator;

View File

@ -137,17 +137,6 @@ body
.allocator = allocator;
}
private nothrow @nogc unittest
{
import tanya.memory.mallocator;
auto oldAllocator = defaultAllocator;
defaultAllocator = Mallocator.instance;
assert(defaultAllocator is Mallocator.instance);
defaultAllocator = oldAllocator;
}
/**
* Returns the size in bytes of the state that needs to be allocated to hold an
* object of type $(D_PARAM T).