Memory allocation failed

Jason House jason.james.house at gmail.com
Tue Feb 17 21:03:30 PST 2009


BCS wrote:

> Reply to Jason,
> 
>> Has anyone else gotten the "Memory allocation failed" exception in D2?
>> I have to dig deeper to concretely prove it's not my fault, but I do
>> know I wrote my app to avoid memory allocation and watching top showed
>> about 20k of growth over the ~10 minutes it takes to reproduce the
>> bug.
>> 
>> I don't look forward to debugging this without gdb.  gdb support has
>> been broken in D2 for a while now :(
>> 
> 
> One guess (I think I ran across this once) is a single allocation of
> size<0 as that ends up being GBs

Apparently, setting an array length to -1 will cause this issue.  It's 
unfortunate to not have a stack trace in the error output, or a functional 
gdb to capture it!  I really hope gdb compatiblity will be fixed :(




More information about the Digitalmars-d mailing list