|
Hi,
after experiencing random 7.2.1 VM crashes in the past, I finally found
a reliable way to crash the VM, even 7.4.
1. Take a plain visual. im
2. Evaluate
ObjectMemory sizesAtStartup: #(1.0 1.0 1.0 100.0 1.0 1.0 1.0)
(yeah, a somewhat ridiculous stack size)
3. Save image, exit, load image again
4. Evaluate
| points maxsize numObjects |
ObjectMemory installMemoryPolicy: MemoryPolicy new setDefaults.
maxsize := ObjectMemory currentMemoryPolicy memoryUpperBound.
numObjects := maxsize // 100.
points := OrderedCollection new.
1 to: numObjects do: [ : i |
points add: (1@2)
].
Crashes on my machine (Win XP, 1 GB RAM, AMD64 3000) all the time
(mmScavenge.c, line 2370, out of memory).
The installation of the memory policy (the first line) is crucial,
without it the test won't crash. It seems that the installed memory
differs from the memory policy of the plain image
(availableSpaceSafetyMargin is much higher).
Another observation:
The crash can be prevented when free memory upper bound is set to a high
value:
ObjectMemory installMemoryPolicy: (MemoryPolicy new setDefaults;
freeMemoryUpperBound: 40000000;yourself).
|