On 4/2/16 5:47 AM, jkpl wrote:
gives: core.exception.OutOfMemoryError@src/core/exception.d(693): Memory
allocation failed



Probably because randomCover needs to allocate a bool for all the elements it has already covered, so you are allocating 32 * 4G bools. How much RAM do you have? Note that D's GC is conservative, so false pointers, especially for large arrays also can cause problems.

I'll note that even if it worked, this code will never complete in your lifetime, or even your great great grandchild's lifetime. I don't understand the point of doing this.

I'll also note that if you just want to test a *subset* of all the possible inputs (given the length of time taken to test all these), you probably want to change different elements each time through the loop. Your code spends a long time testing the same elements in the first slots. Given your test code is just looking at the first element, this isn't very good test coverage.

I honestly think you are better off just generating random arrays, even if it results in some overlap (unlikely to be relevant).

-Steve

Reply via email to