GC-less Hash-Tables (AA)

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Sep 18 03:21:27 PDT 2014


> See our hashmap and hashset implementations here:
> https://github.com/economicmodeling/containers/tree/master/src/containers
>
> These containers are all certified GC-free.

I get loads of erros on DMD 2.066:

memory/allocators.d(81,4): Error: pure function 
'memory.allocators.BlockAllocator!1024LU.BlockAllocator.~this' 
cannot access mutable static data 'it'
memory/allocators.d(81,4): Error: pure function 
'memory.allocators.BlockAllocator!1024LU.BlockAllocator.~this' 
cannot access mutable static data 'it'
memory/allocators.d(81,28): Error: pure function 
'memory.allocators.BlockAllocator!1024LU.BlockAllocator.~this' 
cannot call impure function 'std.allocator.Mallocator.deallocate'
memory/allocators.d(81,28): Error: 
'std.allocator.Mallocator.deallocate' is not nothrow
memory/allocators.d(72,2): Error: destructor 
'memory.allocators.BlockAllocator!1024LU.BlockAllocator.~this' is 
nothrow yet may throw
memory/allocators.d(20,34): Error: template instance 
memory.allocators.BlockAllocator!1024LU error instantiating
/home/per/Work/justd/containers/hashmap.d(339,29):        
instantiated from here: NodeAllocator!(32LU, 1024LU)
/home/per/Work/justd/containers/hashmap.d(13,18):        
instantiated from here: HashMap!(string, int, hashString)
/home/per/Work/justd/containers/hashmap.d(351,12):        
instantiated from here: HashMap!(string, int)
/home/per/Work/justd/containers/hashmap.d(340,17): Error: 
template instance Freelist!(BlockAllocator!1024LU, 32LU, 32LU) is 
used as a type
/home/per/Work/justd/containers/hashmap.d(341,22): Error: 
template instance Freelist!(BlockAllocator!1024LU, 32LU, 32LU) is 
used as a type
/home/per/Work/justd/containers/hashmap.d(342,11): Error: 
template instance SList!(Node, SListNodeAllocator*) is used as a 
type
/home/per/Work/justd/containers/hashmap.d(55,3): Error: undefined 
identifier deallocate, did you mean template 
reallocate(Allocator)(ref Allocator a, ref void[] b, size_t s)?
/home/per/Work/justd/containers/hashmap.d(340,17): Error: 
template instance Freelist!(BlockAllocator!1024LU, 8LU, 8LU) is 
used as a type
/home/per/Work/justd/containers/hashmap.d(341,22): Error: 
template instance Freelist!(BlockAllocator!1024LU, 8LU, 8LU) is 
used as a type
/home/per/Work/justd/containers/hashmap.d(342,11): Error: 
template instance SList!(Node, SListNodeAllocator*) is used as a 
type
/home/per/Work/justd/containers/hashmap.d(55,3): Error: undefined 
identifier deallocate, did you mean template 
reallocate(Allocator)(ref Allocator a, ref void[] b, size_t s)?
/home/per/Work/justd/containers/hashmap.d(19,18): Error: template 
instance containers.hashmap.HashMap!(char, char, builtinHash) 
error instantiating
/home/per/Work/justd/containers/hashmap.d(372,13):        
instantiated from here: HashMap!(char, char)
memory/allocators.d(81,4): Error: pure function 
'memory.allocators.BlockAllocator!512LU.BlockAllocator.~this' 
cannot access mutable static data 'it'
memory/allocators.d(81,4): Error: pure function 
'memory.allocators.BlockAllocator!512LU.BlockAllocator.~this' 
cannot access mutable static data 'it'
memory/allocators.d(81,28): Error: pure function 
'memory.allocators.BlockAllocator!512LU.BlockAllocator.~this' 
cannot call impure function 'std.allocator.Mallocator.deallocate'
memory/allocators.d(81,28): Error: 
'std.allocator.Mallocator.deallocate' is not nothrow
memory/allocators.d(72,2): Error: destructor 
'memory.allocators.BlockAllocator!512LU.BlockAllocator.~this' is 
nothrow yet may throw
memory/allocators.d(20,34): Error: template instance 
memory.allocators.BlockAllocator!512LU error instantiating

Compilation finished at Thu Sep 18 12:20:19


More information about the Digitalmars-d-learn mailing list