So, my question is, would it be possible for me to allocate a wstring object on the stack, and manually set its string data pointer and length? If so, how? Your wizardly help is much appreciated.
Allocating a wstring on the stack (no GC)?
Maxime Chevalier-Boisvert via Digitalmars-d Wed, 07 May 2014 11:30:52 -0700
I have a very specific use case (JIT compiler) in which I have a
pre-allocated array of wchar string data stored somewhere in
memory. I'd like to be able to create a temporary D wstring
object to pass this as a "regular" string to other functions. For
performance reasons, it would be preferable not to dynamically
allocate or copy any data. Dynamically allocating the strings
tends to trigger the D GC which severely impacts the performance.
- Allocating a wstring on the st... Maxime Chevalier-Boisvert via Digitalmars-d
- Re: Allocating a wstring ... Brad Anderson via Digitalmars-d
- Re: Allocating a wstr... Meta via Digitalmars-d
- Re: Allocating a ... bearophile via Digitalmars-d
- Re: Allocating a ... John Colvin via Digitalmars-d
- Re: Allocatin... bearophile via Digitalmars-d
- Re: Allocating a wstr... Maxime Chevalier-Boisvert via Digitalmars-d
- Re: Allocating a ... bearophile via Digitalmars-d
- Re: Allocatin... Maxime Chevalier-Boisvert via Digitalmars-d
- Re: Allo... bearophile via Digitalmars-d
- Re: ... Maxime Chevalier-Boisvert via Digitalmars-d