www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Is it possible to use std.experimental.allocator without the runtime

reply Guillaume Piolat <first.last gmail.com> writes:
Is it possible to use std.experimental.allocator without the 
runtime or with the runtime disabled?

It would be ideal for allocating audio buffers in the audio 
thread. malloc is tolerated but using a pre-allocated area with a 
fallback on malloc would be way better and faster too.
Mar 08 2017
parent reply Jacob Carlborg <doob me.com> writes:
On 2017-03-08 12:59, Guillaume Piolat wrote:
 Is it possible to use std.experimental.allocator without the runtime or
 with the runtime disabled?
I had a quick look through the imports, I could not find anything that I know uses the runtime. Although it does use exceptions and asserts in some places. Exceptions seem to only be used in the free_list module. It also uses compile time features from Phobos. -- /Jacob Carlborg
Mar 08 2017
parent Guillaume Piolat <first.last gmail.com> writes:
On Wednesday, 8 March 2017 at 12:28:13 UTC, Jacob Carlborg wrote:
 On 2017-03-08 12:59, Guillaume Piolat wrote:
 Is it possible to use std.experimental.allocator without the 
 runtime or
 with the runtime disabled?
I had a quick look through the imports, I could not find anything that I know uses the runtime. Although it does use exceptions and asserts in some places. Exceptions seem to only be used in the free_list module. It also uses compile time features from Phobos.
Thanks Jacob. This is something I should have tried earlier.
Mar 08 2017