D - Crash when allocating >65K objects
- Bill Cox (23/23) Jul 30 2003 It's probably something dumb in my setup, but just in case, here's a
- Burton Radons (2/23) Jul 30 2003 Works for me. Make sure you've got DMD 0.68.
It's probably something dumb in my setup, but just in case, here's a
simple bug I've run into.
I was trying to benchmark GC, but anything that allocates over about 65K
objects crashes. Here's a simple example:
class Foo {
int a, b, c;
}
int main(char[][] args)
{
Foo foo;
int i;
for(i = 0; i < 100000; i++) {
printf("i = %d\n", i);
foo = new Foo;
}
return 0;
}
When I run it, it crashes with the last output looking like:
i = 65148
i = 65149
i = 65150
i = 65151
Segmentation fault
Jul 30 2003
Bill Cox wrote:
It's probably something dumb in my setup, but just in case, here's a
simple bug I've run into.
I was trying to benchmark GC, but anything that allocates over about 65K
objects crashes. Here's a simple example:
class Foo {
int a, b, c;
}
int main(char[][] args)
{
Foo foo;
int i;
for(i = 0; i < 100000; i++) {
printf("i = %d\n", i);
foo = new Foo;
}
return 0;
}
Works for me. Make sure you've got DMD 0.68.
Jul 30 2003








Burton Radons <loth users.sourceforge.net>