D on next-gen consoles and for game development

Jonathan M Davis jmdavisProg at gmx.com
Thu May 23 22:44:48 PDT 2013


On Friday, May 24, 2013 15:37:39 Manu wrote:
> I'd say a majority of phobos
> allocations are created when passing strings through to library/system
> calls.

That does sound probable, as toStringz will often (and unpredictably) result 
in allocations, and it does seem like a prime location for at least attempting 
to use a static array instead as you suggested. But if toStringz _wouldn't_ 
result in an allocation, then copying to a static array would be inadvisable, 
so we're probably going to need a function which does toStringz's test so that 
it can be used outside of toStringz.

- Jonathan M Davis


More information about the Digitalmars-d mailing list