Memory Allocation

Gary Willoughby via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Mar 30 04:22:05 PDT 2017


On Wednesday, 29 March 2017 at 19:19:48 UTC, Enigma wrote:
> I have a memory buffer allocated using different methods. It is 
> simply a pointer and a size.
>
> I would like to be able to manage this buffer by treating it as 
> a memory pool or heap. I think I can use allocators to do this 
> but not sure how.

You can re-task the GC to use an arena if that's suitable:

https://bitbucket.org/infognition/dstuff/src/1dca752af1021ed5998bb041004465674695113f/gcarena.d?fileviewer=file-view-default


More information about the Digitalmars-d-learn mailing list