std.allocator ready for some abuse

ANtlord via Digitalmars-d digitalmars-d at puremagic.com
Fri Feb 27 00:18:51 PST 2015


On Thursday, 26 February 2015 at 21:01:27 UTC, Piotrek wrote:
> Hi,
>
> Sorry for putting it here but I don't know where to file a bug 
> report for the allocator project.
>
> On 32-bit linux with the latest dmd beta I get errors for ulong 
> -> uint (size_t) conversions.
>
> dmd -main -unittest allocator.d
>
> allocator.d(2015): Error: cannot implicitly convert expression 
> (i * 4096LU) of type ulong to uint
> allocator.d(2015): Error: cannot implicitly convert expression 
> ((i + cast(ulong)blocks) * 4096LU) of type ulong to uint
> allocator.d(1743): Error: template instance 
> std.allocator.HeapBlock!(4096u, 4u) <cut the long line>
> allocator.d(331):        instantiated from here: 
> HeapBlock!(4096u, 4u)
> allocator.d(334): Error: template instance Segregator! <cut the 
> long line>
> allocator.d(2015): Error: cannot implicitly convert expression 
> (i * 128LU) of type ulong to uint
> allocator.d(2015): Error: cannot implicitly convert expression 
> ((i + cast(ulong)blocks) * 128LU) of type ulong to uint
> allocator.d(1743): Error: template instance 
> std.allocator.HeapBlock!(128u, 4u) <cut the long line>
>  , __ctmp2303).this(m)) error instantiating
> allocator.d(1342):        instantiated from here: 
> HeapBlock!(128u, 4u)
> allocator.d(1493): Error: cannot implicitly convert expression 
> (x / 64LU) of type ulong to immutable(uint)
> allocator.d(1495): Error: cannot implicitly convert expression 
> (y / 64LU) of type ulong to immutable(uint)
> allocator.d(1520): Error: cannot implicitly convert expression 
> (x / 64LU) of type ulong to uint
> allocator.d(1526): Error: cannot implicitly convert expression 
> (i) of type ulong to uint
> allocator.d(1527): Error: cannot implicitly convert expression 
> (i) of type ulong to uint
> allocator.d(1544): Error: cannot implicitly convert expression 
> (w) of type ulong to uint
> allocator.d(1553): Error: cannot implicitly convert expression 
> (w) of type ulong to uint
> allocator.d(1572): Error: cannot implicitly convert expression 
> (w) of type ulong to uint
> allocator.d(1582): Error: cannot implicitly convert expression 
> (w) of type ulong to uint
> allocator.d(1607): Error: cannot implicitly convert expression 
> (i) of type ulong to uint
> allocator.d(1615): Error: cannot implicitly convert expression 
> (i) of type ulong to uint
> allocator.d(1627): Error: cannot implicitly convert expression 
> (i) of type ulong to uint
> allocator.d(1633): Error: cannot implicitly convert expression 
> (i) of type ulong to uint
> allocator.d(4143): Error: function 
> std.allocator.roundUpToMultipleOf (uint s, uint base) is not 
> callable using argument types (ulong, uint)
>
>
> Is it a known issue? Or are there currently only 64-bit OSes 
> supported by the allocator project?
>
> Piotrek

I think, that if use this project 
https://github.com/andralex/std_allocator/, than you can post the 
issue to related issue tracker. And I see, that types in 
traceback are different from source 
https://github.com/andralex/std_allocator/blob/master/source/std/allocator.d#L857. 
Maybe you need to upgrade package.

Sorry, if my english isn't clear.


More information about the Digitalmars-d mailing list