dynamic array memory allocation

Traveler Hauptman none at none.com
Thu May 17 14:55:57 PDT 2007


Walter Bright wrote:
> Traveler Hauptman wrote:
>> It would be nice to be able to set minimum allocation chunk size on a
>> type-by-type basis; especially for small types. Or is that considered a
>> compiler optimization?
> 
> D allows for custom memory allocation schemes by overloading operators
> new and delete for a class/struct, or by using malloc/free (or one's own
> allocator) directly.

I was suggesting a compromise for array allocation between what D has
now and what Greg was asking for. I'm assuming you can't overload
new/delete for arrays and the fundamental types.

I gotta say though, when I first looked at D a couple years ago and saw
that you gave access to the memory allocation layer with new/delete; I
think I jumped up and did a little dance. (I write hard-realtime code)

Cheers



More information about the Digitalmars-d mailing list