In scryer-prolog I want to allocate integers to a custom garbage-collected arena so that the memory of unreachable (but always immutable) integers and rationals can be implicitly recycled without calling any Drop instance. dashu doesn't currently have a means to customize allocation.
I'd like to submit a PR to add the feature to dashu, likely by elevating MemoryAllocation to a trait whose instance can be specified in the ibig! and ubig! macros among other places, at least until the allocator_api is merged to stable (probably not for a long while yet).
Is this acceptable @cmpute ? Or perhaps there's a way to go about this that I don't know about?
In scryer-prolog I want to allocate integers to a custom garbage-collected arena so that the memory of unreachable (but always immutable) integers and rationals can be implicitly recycled without calling any
Dropinstance. dashu doesn't currently have a means to customize allocation.I'd like to submit a PR to add the feature to dashu, likely by elevating
MemoryAllocationto a trait whose instance can be specified in theibig!andubig!macros among other places, at least until theallocator_apiis merged to stable (probably not for a long while yet).Is this acceptable @cmpute ? Or perhaps there's a way to go about this that I don't know about?